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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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