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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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