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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Newbie22
Resolver I
Resolver I

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
123421
567821
123420
389111
987611
567820

 

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 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

1) You need to create an index column.

Screen Capture #743.pngScreen Capture #744.png

2) write such a measure.

Screen Capture #746.png

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

 

View solution in original post

2 REPLIES 2
Newbie22
Resolver I
Resolver I

Hi @Ahmedx , it worked 🤗 Thank you so much for your help and effort. You saved my life. 😅

Ahmedx
Super User
Super User

1) You need to create an index column.

Screen Capture #743.pngScreen Capture #744.png

2) write such a measure.

Screen Capture #746.png

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

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.