The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi all,
I'm curious if there are any ideal methods for performing multiple duplicate tests on the same table, each testing different columns.
For example, from the below, I'd like to identify duplicates on the following columns 1) ID and Invoice, 2) Date and Amount. Ideally, I'd like a flag field like I've shown below in the DuplicatesFlag1 and DuplicatesFlag2 fields, but I am not sure if that is an option.
My current thought is that I'll have to create separate copies of the table and use the group by functionality for each duplicate test, and then join back to the main table to create the flags.
I appreciate any and all advice! Thank you.
Solved! Go to Solution.
Hi,
Write these calculated column formulas
Column = 1*(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Invoice]=EARLIER(Data[Invoice])))>1)
Column 2 = 1*(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Date]=EARLIER(Data[Date])&&Data[Amount]=EARLIER(Data[Amount])))>1)
Hope this helps.
Hi,
Write these calculated column formulas
Column = 1*(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Invoice]=EARLIER(Data[Invoice])))>1)
Column 2 = 1*(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Date]=EARLIER(Data[Date])&&Data[Amount]=EARLIER(Data[Amount])))>1)
Hope this helps.
This works perfectly. Thank you!
You are welcome.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
77 | |
72 | |
47 | |
39 |
User | Count |
---|---|
138 | |
108 | |
69 | |
64 | |
57 |