Forum Discussion
DAX Help: Find Duplicate Values and Mark duplicated values as Zero and the original as One
Hi!
I'm trying to find a DAX wherein I can find a duplicate values and mark the duplicate values as Zero. Here's the sample table in excel.
| Invoice # | How many Duplicates? | Desired Output |
| 1234 | 2 | 1 |
| 5678 | 2 | 1 |
| 1234 | 2 | 0 |
| 3891 | 1 | 1 |
| 9876 | 1 | 1 |
| 5678 | 2 | 0 |
As you can see Invoice # 1234 and 5678 have duplicates. I need the desired output column wherein the original invoices are tag as 1 and the duplicates are 0.
1) You need to create an index column.
2) write such a measure.
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://1drv.ms/u/s!AiUZ0Ws7G26Rhl_I6iKctqi_y6pB?e=EdSNHC
2 Replies
- Ahmedx
Super User
1) You need to create an index column.
2) write such a measure.
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://1drv.ms/u/s!AiUZ0Ws7G26Rhl_I6iKctqi_y6pB?e=EdSNHC