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
srivally
Helper I
Helper I

Rank customers

Hi All,

 

I want to rank the customers based on Year and Month. I have tried many cases but not worked out. Could you please help me on this.

I have attached the excel file  in the https://www.dropbox.com/s/qmi7aylbqc3bred/Rank%20Sample.xlsx?dl=0

link and the rank which I wanted to display. 

 

Regards,

Srivalli

1 ACCEPTED SOLUTION

I got the solution. I have created the measure with that query earlier. Instead of creating measure, if we create a column with the same query, it's working.
Thank you @v-yulgu-msft

 

Regards,

Srivalli

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @srivally,

 

DAX for calculated column [Rank].

Rank =
RANKX (
    FILTER ( Sheet1, Sheet1[Customers] = EARLIER ( Sheet1[Customers] ) ),
    Sheet1[Balance],
    ,
    DESC,
    DENSE
)

Best regards,

Yuliana Gu

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

Hi @v-yulgu-msft,

I have tried the same DAX query, but I'm facing the error attached.
https://www.dropbox.com/s/37u9pzufgv5klqr/Error.PNG?dl=0

Regards,

Srivalli

I got the solution. I have created the measure with that query earlier. Instead of creating measure, if we create a column with the same query, it's working.
Thank you @v-yulgu-msft

 

Regards,

Srivalli

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.