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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
johnmelbourne
Helper V
Helper V

RANKX query

Hi,

Below is my scenario. Any assistance would be greatly appreciated.

I have attached a pbix with the data.

One note I didn't include below was, doesn't rank A as has no services (is blank).

 

query.jpg

 

Filename Size URL Expires at

query.pbix
68.07 KB
https://tmpfiles.org/dl/922690/query.pbix
2023-02-09 07:49 UTC


Many thanks for viewers and attempted solutions.

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@johnmelbourne,

 

Try this solution.

 

Data model:

 

DataInsights_0-1675986845679.png

 

Measures:

 

Total Complaints = SUM ( FactTable[Total Complaints] )
Total Services = SUM ( FactTable[Total Services] )
Rank = RANKX ( ALLSELECTED ( FactTable ), [Total Complaints],, ASC )

 

Create a matrix using DimProvider[Provider] and the three measures. Add a visual filter:

 

DataInsights_1-1675987001005.png

 

Result:

 

DataInsights_2-1675987031611.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
DataInsights
Super User
Super User

@johnmelbourne,

 

Try this solution.

 

Data model:

 

DataInsights_0-1675986845679.png

 

Measures:

 

Total Complaints = SUM ( FactTable[Total Complaints] )
Total Services = SUM ( FactTable[Total Services] )
Rank = RANKX ( ALLSELECTED ( FactTable ), [Total Complaints],, ASC )

 

Create a matrix using DimProvider[Provider] and the three measures. Add a visual filter:

 

DataInsights_1-1675987001005.png

 

Result:

 

DataInsights_2-1675987031611.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Many thanks @DataInsights , I really appreciate your time and response. The visual filter is necessary I believe. I couldn't work out any other way. Thanks. 

John

@johnmelbourne,

 

Glad to hear that works.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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