Forum Discussion

cruncher's avatar
cruncher
Icon for Helper II rankHelper II
1 year ago
Solved

Rankx function is behaving weird when used in table with extra columns and Slicers

Hi Experts.   I am having a hard time understanding dax evaluation context in Rankx function. I want to rank the customers based on sales. These are the steps I have followed.   Step 1: Creating ...
  • v-kathullac's avatar
    v-kathullac
    1 year ago

    Hi cruncher ,

     

    Can you try with below dax measure attaching the screenshot for your reference.

    Customer_Rank 3 = 
    RANKX(
        FILTER(
            ALLSELECTED(Sales),
            Sales[Rank Source] = "Yes"
                && Sales[Source] IN VALUES(Sales[Source])
        ),
        CALCULATE(SUM(Sales[Sales])),
        ,
        DESC,
        DENSE
    )
    

     

    Regards,

    Chaithanya.