Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a table and count the number of occurrences of a column value in a measure. This works fine.
CountOfColumn = COUNTROWS(FILTER(Table; Table[Column] = Table[Column]))
Now I would like to add a rank based on the count. so that the the entry with the most occurrences has rank 1, the next 2 etc.
This would make it possible to show the top n most frequent items.
I tried
RankByCountOfColumn = RANKX(Table; [CountOfColumn])
But the rank is always the same for each column although the counts are diffent.
Solved! Go to Solution.
This should work with the [column]
RankByCountOfColumn = RANKX ( ALL ( Table[Column] ); [CountOfColumn] )
hello, try adding ALL.
RankByCountOfColumn = RANKX(All(Table); [CountOfColumn])
Hello Victor, no, it does not help, the rank is still always the same.
This should work with the [column]
RankByCountOfColumn = RANKX ( ALL ( Table[Column] ); [CountOfColumn] )
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!