cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Moxat Frequent Visitor
Frequent Visitor

Group By ID and rank it in sequence of date

I have data in a below mentioned format. I am trying to add new column which will give rank to the row by Modified Date and group by Number. 

 

Data:

NumberModified Date
80289994/18/2019 12:40 PM
80289994/1/2019 6:28 AM
80289994/17/2019 10:38 AM
80289994/1/2019 6:28 AM
80291344/15/2019 3:58 PM
80291344/1/2019 7:46 AM
80291344/1/2019 7:46 AM
80291344/15/2019 3:58 PM
80326404/1/2019 9:38 PM
80326404/2/2019 3:47 PM
80326404/1/2019 9:38 PM
80326404/1/2019 9:41 PM
80328194/2/2019 2:52 PM
80328194/1/2019 10:06 PM
80328194/2/2019 2:50 PM
80328194/1/2019 10:06 PM
80328404/1/2019 10:09 PM
80328404/1/2019 10:10 PM
80328404/17/2019 10:48 AM
80328404/23/2019 3:07 PM
80328404/22/2019 9:18 PM
80334094/1/2019 11:42 PM
80334094/1/2019 11:42 PM
80334094/17/2019 10:32 AM
80334094/17/2019 11:17 PM
80340794/2/2019 1:14 AM
80340794/2/2019 6:53 AM
80340794/2/2019 1:14 AM
80340794/10/2019 9:46 PM

 

Expected Result

NumberModified DateDuplicateNumber
80289994/18/2019 12:40 PM3
80289994/1/2019 6:28 AM1
80289994/17/2019 10:38 AM2
80289994/1/2019 6:28 AM1
80291344/15/2019 3:58 PM2
80291344/1/2019 7:46 AM1
80291344/1/2019 7:46 AM1
80291344/15/2019 3:58 PM2
80326404/1/2019 9:38 PM1
80326404/2/2019 3:47 PM3
80326404/1/2019 9:38 PM1
80326404/1/2019 9:41 PM2
80328194/2/2019 2:52 PM3
80328194/1/2019 10:06 PM1
80328194/2/2019 2:50 PM2
80328194/1/2019 10:06 PM1
80328404/1/2019 10:09 PM1
80328404/1/2019 10:10 PM2
80328404/17/2019 10:48 AM3
80328404/23/2019 3:07 PM5
80328404/22/2019 9:18 PM4
80334094/1/2019 11:42 PM1
80334094/1/2019 11:42 PM1
80334094/17/2019 10:32 AM2
80334094/17/2019 11:17 PM3
80340794/2/2019 1:14 AM1
80340794/2/2019 6:53 AM2
80340794/2/2019 1:14 AM1
80340794/10/2019 9:46 PM3
3 REPLIES 3
Community Support Team
Community Support Team

Re: Group By ID and rank it in sequence of date

@Moxat ,

 

Create a calculate column using DAX below:

DuplicateNumber = RANKX(FILTER('Table', 'Table'[Number] = EARLIER('Table'[Number])), 'Table'[Modified Date], , ASC, Dense)

1.PNG

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Moxat Frequent Visitor
Frequent Visitor

Re: Group By ID and rank it in sequence of date

Thank you for the response. I did try the DAX formula you provided. But it does not gives me duplicate number in sequence of date/time. 

Community Support Team
Community Support Team

Re: Group By ID and rank it in sequence of date

@Moxat ,

 

So what's your requirement and expected result? Could you share more details?

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors