Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
It seems to be a weird behaviour of Rankx. I'm trying to rank Day Name based on a certain measure.
My formula is
DayNameRank = rankx(ALL('Case'[DayName]),[Measure])
Since the column being ranked is a text, Power BI sorts its items alphabetically. So I use day of week to custom sort the day names. The above formula works fine if the Day Name column is sorted by itself but returns 1 if sorted by day of week.
I would greatly appreciate your help.
Proud to be a Super User!
Solved! Go to Solution.
I searched the web and found out that this is indeed a behavior of RANKX. This can be fixed by including the sort column to the formula. So it should have been:
DayNameRank = RANKX ( ALL ( 'Case'[DayName], 'Case'[Day of Week] ), [Measure] )
The explanation is on sqlbi
Proud to be a Super User!
I searched the web and found out that this is indeed a behavior of RANKX. This can be fixed by including the sort column to the formula. So it should have been:
DayNameRank = RANKX ( ALL ( 'Case'[DayName], 'Case'[Day of Week] ), [Measure] )
The explanation is on sqlbi
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |