Forum Discussion

testyuiiop's avatar
testyuiiop
Helper I
2 years ago
Solved

Rank based on dynamic slicer selection

Hi All,

I have a sales table, and I am ranking my customers based on below dax:

    RANKX(
        ALLSELECTED(Sales[Cust ID],Sales[Cust Name])
        ,[Total Sales]
        ,
        ,ASC
    )

I also have two slicers on my report , one which will filter customer location and another year. I have only one sales table and all columns are coming from it. When I don't select anything it give the correct ranking but when I apply filter on the slicers it doesn't work. How I can make the rank function work based on filter selection?

6 Replies