Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

RANKX Issue

 

I want to show the rank based on the customer name only.

Here is the formula used

Customer Rank  = RANKX( ALL( Sales[CustomerName]), [Amount],,DESC)
Please help .

4 Replies

  • Hello Anonymous 

    Give this a try.

    Customer Rank =
    CALCULATE (
        RANKX ( ALL ( Sales[CustomerName] ), [Amount],, DESC ),
        ALLSELECTED ( Sales[StateName] )
    )
    
    • Anonymous's avatar
      Anonymous
      Not applicable

      It worked . Still there is an issue brother. Same customer with different state is showing in different rows.

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi Anonymous ,

     

    Would you like to provide some sample data?I need to understand a clearer model.

     

    Best Regards,

    Eads

     

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Please refer image, data is from a single table only.