Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jaime123
Regular Visitor

Ranked Customers by Month

Hi Everyone,

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

Data.png

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.

1 ACCEPTED SOLUTION
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)

1.JPG

Regards,
Lydia

View solution in original post

3 REPLIES 3
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)

1.JPG

Regards,
Lydia

Thanks for your help Lydia! 

Ashish_Mathur
Super User
Super User

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.