Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Query on Ranking based on sorted values

I have created matrix based on category and sum of error count. I have tried to create Rank based on sum of error count, am getting rank as 1 for all the category. I have used below formula.

Rank =
RANKX (Sheet1,SUM(Sheet1[Err Cnt]),,DESC,Dense). 
Please guide to get a rank based on the sum of erro count by category,
 
Have a Nice Day!!!!!
Regards,
Ganesh N
1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Anonymous , First create a calculated column 

 

SumErrCntByCategory =
CALCULATE(
SUM(Sheet1[Err Cnt]),
ALLEXCEPT(Sheet1, Sheet1[Category])
)

 

Then create a Rank Measure

Rank =
RANKX(
ALL(Sheet1[Category]),
CALCULATE(SUM(Sheet1[Err Cnt])),
,
DESC,
DENSE
)

 

Use Rank Measure in your visual




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you @bhanu_gautam. it is working

 

bhanu_gautam
Super User
Super User

@Anonymous , First create a calculated column 

 

SumErrCntByCategory =
CALCULATE(
SUM(Sheet1[Err Cnt]),
ALLEXCEPT(Sheet1, Sheet1[Category])
)

 

Then create a Rank Measure

Rank =
RANKX(
ALL(Sheet1[Category]),
CALCULATE(SUM(Sheet1[Err Cnt])),
,
DESC,
DENSE
)

 

Use Rank Measure in your visual




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors