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
Anonymous
Not applicable

Rank Orders based on Date

Hi all,

 

I have the following dilemma:

 

I am trying to create a calculated column that would show me (based on the date of the order), the rank of that order for the specific customer.

Example:

CustomerOrderDateRank
1A01,01,20181
1A01,01,20181
1B14,03,20182
2C01,01,20183
2D28,02,20172
2E13,04,20161

 

I know I have to use RANKX, but I cannot find a way to do it for specific customers based on their date

 

Any help will be appreciated

 

Thx ! 

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@Anonymous Please try this as a "New Column"

 

Rank = RANKX(FILTER(Test114Rnk,Test114Rnk[Customer]=EARLIER(Test114Rnk[Customer])),[Date],,ASC,Dense)

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

2 REPLIES 2
PattemManohar
Community Champion
Community Champion

@Anonymous Please try this as a "New Column"

 

Rank = RANKX(FILTER(Test114Rnk,Test114Rnk[Customer]=EARLIER(Test114Rnk[Customer])),[Date],,ASC,Dense)

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Is it possible for this to be dynamic, based on the date filter? For example, how do we get it to recalculate the rank of the customer using a date slicer?

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.