Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
85 | |
83 | |
66 | |
60 | |
56 |
User | Count |
---|---|
183 | |
111 | |
105 | |
77 | |
70 |