Forum Discussion
mg-66
4 years agoRegular Visitor
Highest 5 MAX Values in a single Column
Hello Guys, I need your Help. I have a Column with Temperature Values we measured. I would like to calculate the average of my highest 5 values for example. I would appreciate every answer. ...
- Anonymous4 years ago
Hi mg-66 ,
According to my understanding, you want to calculate the top5 average of each Time(same Hour and Minute), right?
Please use the following formula to create Rank and Average measure:
Rank = RANKX(FILTER(ALL('Table'), HOUR([Time])=HOUR(MAX('Table'[Time])) && MINUTE([Time])=MINUTE(MAX('Table'[Time]))), CALCULATE ( MAX ( ( 'Table'[Tmax]) ) ),,DESC,Dense)Average = CALCULATE(AVERAGE('Table'[Tmax]),FILTER(ALL('Table'), HOUR([Time])=HOUR(MAX('Table'[Time])) && MINUTE([Time])=MINUTE(MAX('Table'[Time]))&& [Rank]<=5))Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi mg-66 ,
According to my understanding, you want to calculate the top5 average of each Time(same Hour and Minute), right?
Please use the following formula to create Rank and Average measure:
Rank = RANKX(FILTER(ALL('Table'), HOUR([Time])=HOUR(MAX('Table'[Time])) && MINUTE([Time])=MINUTE(MAX('Table'[Time]))), CALCULATE ( MAX ( ( 'Table'[Tmax]) ) ),,DESC,Dense)Average = CALCULATE(AVERAGE('Table'[Tmax]),FILTER(ALL('Table'), HOUR([Time])=HOUR(MAX('Table'[Time])) && MINUTE([Time])=MINUTE(MAX('Table'[Time]))&& [Rank]<=5))
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- mg-664 years agoRegular Visitor
Thanks for your Help Anonymous .
I appreciate your work.