Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.