Forum Discussion

Yew-Slaston's avatar
Yew-Slaston
New Member
5 years ago
Solved

RANKX as measure with variable table

Dear community. What I'm doing wrong? I get for each customer rank 1. The idea is to calculate dynamic rank in a table which is a variable, depending on current filter context.   DynRank = VAR R...
  • v-xulin-mstf's avatar
    5 years ago

    Hi Yew-Slaston

     

    You can create virtual table 'filter_table' based on the filter.

    Then try measure as:

    = RANKX(
           'filter_table',
           Calculate(
                sum(tbSales[sales]),
                ALL('tbSales')
           )
    )

    If the issue remains unresolved, please provide the pbix file after removing sensitive information.

     

    Best Regards,
    Link

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.