Forum Discussion

Jaime123's avatar
Jaime123
Regular Visitor
8 years ago
Solved

Ranked Customers by Month

Hi Everyone,

I need some assistance with getting ranks by month. Here is an example of my data:

I am trying to get a new column with the rank for each customer based on sales per month. So I can rank customers from 1 to 5 for each month.

  • Anonymous's avatar
    Anonymous
    8 years ago

    Jaime123,

    Create the following column in your table and check if you get expected result.

    RankColumn = RANKX(FILTER(Table,Table[Month]=EARLIER(Table[Month])),Table[Sales],,DESC,Dense)



    Regards,
    Lydia

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Jaime123,

    Create the following column in your table and check if you get expected result.

    RankColumn = RANKX(FILTER(Table,Table[Month]=EARLIER(Table[Month])),Table[Sales],,DESC,Dense)



    Regards,
    Lydia

  • Hi,

     

    Try this calculated field formula

     

    =RANKX(ALL(Data[Customer Name]),[Revenue])

     

    I have assumed that Revenue is a field you have computed as the sum of the sales column in your Data Table.