The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 Order | Shipping Line | Shipping Date |
123456 | 5 | 09/15/2019 |
123456 | 6 | 9/16/2019 |
78910 | 1 | 9/16/2019 |
78910 | 3 | 9/17/2019 |
987654 | 1 | 9/18/2019 |
654321 | 2 | 9/19/2019 |
Would have a column that looks like this:
Shipping Order | Shipping Line | Shipping Date | Duplicate Count |
123456 | 5 | 09/15/2019 | 1 |
123456 | 6 | 9/16/2019 | 2 |
78910 | 1 | 9/16/2019 | 1 |
78910 | 3 | 9/17/2019 | 2 |
987654 | 1 | 9/18/2019 | 1 |
654321 | 2 | 9/19/2019 | 1 |
Solved! Go to Solution.
Hi,
I think this Forum Post answers your question.
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 🙂
Hi,
I think this Forum Post answers your question.
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 🙂
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.
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 🙂
Use M as suggested or use RANKX
Look at the last row I added. I put 3 in the duplicate count. Is that your expected result?
Shipping Order | Shipping Line | Shipping Date | Duplicate Count |
123456 | 5 | 09/15/2019 | 1 |
123456 | 6 | 9/16/2019 | 2 |
78910 | 1 | 9/16/2019 | 1 |
78910 | 3 | 9/17/2019 | 2 |
987654 | 1 | 9/18/2019 | 1 |
654321 | 2 | 9/19/2019 | 1 |
123456 | any | 9/21/2019 | 3 |