Forum Discussion

johnmelbourne's avatar
3 years ago
Solved

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).

 

 

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.

 

  • johnmelbourne,

     

    Try this solution.

     

    Data model:

     

     

    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:

     

     

    Result:

     

     

3 Replies

  • johnmelbourne,

     

    Try this solution.

     

    Data model:

     

     

    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:

     

     

    Result: