cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## 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:

 Customer Order Date Rank 1 A 01,01,2018 1 1 A 01,01,2018 1 1 B 14,03,2018 2 2 C 01,01,2018 3 2 D 28,02,2017 2 2 E 13,04,2016 1

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

Accepted Solutions
Super User

## Re: Rank Orders based on Date

@sailor321 Please try this as a "New Column"

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

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

Proud to be a Datanaut !

Super User

## Re: Rank Orders based on Date

@sailor321 Please try this as a "New Column"

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

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

Proud to be a Datanaut !