Forum Discussion
mg-66
4 years agoRegular Visitor
Calculate Average from highest X values
Hello everyone, I am new to Power BI and could need your help. I have a Dataset that consistes of many tables and looks now like this: Date Temp. ..... ..... 105,2 ..... ..... 103...
- 4 years ago
mg-66 , Create a column Rank
R1= Rankx(Table, [Temp],,desc, dense)
Then create a measure
Averagex(filter(Table, Table[R1]<=2), Table[Temp])
amitchandak
4 years agoSuper User
mg-66 , Create a column Rank
R1= Rankx(Table, [Temp],,desc, dense)
Then create a measure
Averagex(filter(Table, Table[R1]<=2), Table[Temp])
mg-66
4 years agoRegular Visitor
amitchandak thanks alot, it works now 😀.
I would like to add something.
I want to do the same, but sort the Temp. according to their day and to their Starting Time (ST). Like in this table for example:
| Day | ST | Temp | Rank |
| 1 | 8am | 105,2 | 1 |
| 1 | 8am | 103,3 | 2 |
| 1 | 8am | 98,7 | 3 |
| 1 | 10am | 99,1 | 3 |
| 1 | 10am | 101,5 | 1 |
| 1 | 10am | 99,8 | 2 |
| 2 | 8am | 105,4 | 1 |
| 2 | 8am | 100,3 | 2 |
| 2 | 8am | 96,7 | 3 |
| 2 | 10am | 97,7 | 2 |
| 2 | 10am | 98,8 | 1 |
Then I will calculate the average in the same way by clicking the Day & Starting Time (ST) Slicer/Filter in the report.