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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yuezhe-msft
Employee
Employee

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.