If your data set has multiple peaks, you can calculate Idxmax for each peak separately. Alternatively, you can use other statistical methods to analyze your data and identify the most significant peaks.