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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.