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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
CDBIN
New Member

Sum of Rank Measures Output

I am new to BI and DAX, and have run into a wall - Normally I can find the answers with some research! I have a report with multiple columns displaying metric results.

 

I have ranked these results based on performance via the measure below:

Needed Rank = rankx(allselected(Query2[Site Selected]),CALCULATE(AVERAGE(Query2[Metric])),,asc)
 
There are 12 such ranking measures, one for each metric.
 
I am needing to get the sum of the Ranks by site to get a cumulative total of their ranking (which will then be ranked!) - However every function I attempt returns an aggragate number rather than the accurate return. 
 
One example is below, althogh I have tried many sum and calculate versions - cannot get it to function!
 
Total Rank = sumx(ALLSELECTED(Query2[Site]),[Metric Rank1]+[Metric Rank2])
 
This returns 130 for all sites, maximum possible return for the poorest site would be 26. 
1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

hi, @CDBIN 

try below
make a column of average

avg. column = CALCULATE(AVERAGE(Query2[Metric])



then make a measure

measure=
 SUMX(
   FILTER(
     ALL('Table'),
    'Table'[avg. column] <=MAX('Table'[avg. column])
   ),
   [needed rank]
 )

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @CDBIN ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Dangar332
Super User
Super User

hi, @CDBIN 

try below
make a column of average

avg. column = CALCULATE(AVERAGE(Query2[Metric])



then make a measure

measure=
 SUMX(
   FILTER(
     ALL('Table'),
    'Table'[avg. column] <=MAX('Table'[avg. column])
   ),
   [needed rank]
 )

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.