Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Use M as suggested or use RANKX

    • Anonymous's avatar
      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's avatar
    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