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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.