Forum Discussion

pbi_challenger's avatar
pbi_challenger
New Member
3 years ago

RANKX with slicer

Hi PBI community

 

I’ve created a RANKX measure that provides the ranking of a particular client based on the number of enhancements requests they have raised.

 

I’ve played around with multiple versions incl. ALLSELECTED which doesn’t seem to fit my use case because I want to only display the rank of a single client.

 

Current formula –

 

Client Global Ranking = IF(

    HASONEVALUE(Ideas[Client Name]),

       RANKX(ALL(Ideas[Client Name]),Ideas[# Ideas]),

              BLANK())

 

The formula works great when I have multiple clients displayed in a table. As an example the third row below correctly displays a rank = 3.

 

 

However I want to be able to filter down to this unique client and just show that single row (or ideally in a card). But I when I apply this slicer, it just defaults to an incorrect ranking of 2 (but overall count of ideas is still correct).

Very stuck at this point!. Could someone please assist?

5 Replies

    • pbi_challenger's avatar
      pbi_challenger
      New Member

      Hi - thanks for the suggestions. Unfortuantely same issue (also if i apply skip instead of dense)

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        pbi_challenger ,
        Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • baltemus's avatar
    baltemus
    Frequent Visitor

    Hi, was this ever resolved?  I am running into a similar issue where when a slicer for the same dimension I am ranking over is applied, the rank value for some of the dimensions when you filter down to one dimension value at a time changes/produces an incorrect result for their ranking.