Forum Discussion

LXXVII's avatar
LXXVII
Frequent Visitor
2 years ago
Solved

Change ranking to be static when filtered

Hi everyone,   I am at my wits end with this one. I have data that sits in hierarchy. I have total sales by store, but I have used the hierarchy feature to create a hierarchy which is Division -> R...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi LXXVII ,

     

    Hope everything is going well.

     

    Please try:

    RankMeasure = 
    CALCULATE(
        RANKX(
            ALL('EntityTable'), 
            CALCULATE(SUM('TotalSalesTable'[TotalSales]))
        ),
        ALLEXCEPT('EntityTable', 'EntityTable'[Store])
    )

     

    Put the created measure value into the visual object, the page is as follows:

     

    After applying the slicer, the page is as follows. You can see that the slicer does not affect the sorting.

     

    Power BI Desktop files are attached.

     

    If you have any other questions please feel free to contact me.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!