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

Sequentially number duplicates

I am trying to figure out how to create a calculated column to sequentially count any duplicate values.  In my case, I need to check for duplicates in the "Shipping Order" column and sequentially number them.  

 

Shipping OrderShipping LineShipping Date
123456509/15/2019
12345669/16/2019
7891019/16/2019
7891039/17/2019
98765419/18/2019
65432129/19/2019

 

Would have a column that looks like this:

 

Shipping OrderShipping LineShipping DateDuplicate Count
123456509/15/20191
12345669/16/20192
7891019/16/20191
7891039/17/20192
98765419/18/20191
65432129/19/20191
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

I think this Forum Post answers your question.

https://community.powerbi.com/t5/Desktop/How-to-add-Row-number-over-partition-by-Customer-DAX-or-M-q...

 

Best Regards,
Vignesh M

If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi,

 

I think this Forum Post answers your question.

https://community.powerbi.com/t5/Desktop/How-to-add-Row-number-over-partition-by-Customer-DAX-or-M-q...

 

Best Regards,
Vignesh M

If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂

Anonymous
Not applicable

Thank you, this is exactly what I was looking for, specifically the post from @Anonymous.  I thought I had searched the forums for a solution but obviously not well enough.

 

@Anonymous Thank you for your reply as well.  I needed the duplicate numbers from the calculated column, not necessarily a total count of duplicates.


@Anonymous wrote:

Hi,

 

I think this Forum Post answers your question.

https://community.powerbi.com/t5/Desktop/How-to-add-Row-number-over-partition-by-Customer-DAX-or-M-query/td-p/566949

 

Best Regards,
Vignesh M

If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂


 

Anonymous
Not applicable

Use M as suggested or use RANKX

Anonymous
Not applicable

Look at the last row I added. I put 3 in the duplicate count. Is that your expected result?

Shipping OrderShipping LineShipping DateDuplicate Count
123456509/15/20191
12345669/16/20192
7891019/16/20191
7891039/17/20192
98765419/18/20191
65432129/19/20191
123456any9/21/20193

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.