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

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
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

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.

Anonymous
Not applicable

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. 

@Anonymous ,

 

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
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.