Forum Discussion
Checking if right code was deleted
v-diye-msft thanks!
So the data needs to look at both columns. You want to see if an ID has the combination of codes (column & column 2), and if it does, its deleting the column 2 code, not the column 1 code. Hope that makes sense.
Do you mean if there's ID has the codes from both column 1 and column 2, then delete the one in column2?
But why you delete the 44444 in this description below? it's from column1.
" However, the next example is not right. ID B has codes 44444 and 11111. But instead of code 11111 being deleted, code 44444 was deleted. "
- PowerBI1234566 years agoPost Partisan
v-diye-msft Sorry, should have been more clear. That would be a finding/exception. I am trying to find instances where the wrong code was deleted. Hope that makes sense. Thanks!
- PowerBI1234566 years agoPost Partisan
Hi - just seeing if anyone had any ideas, thanks again!
- mahoneypat6 years agoMicrosoft Employee
A little confused on your scenario but I think this does what you are looking for. Assuming you have a relationship between the Data column and Column1 of your second table, you can make a Calculated Column with this expression to identify missed deletions.
Missed Deletion = VAR __badcode = IF ( Codes[Item] = "Code1", RELATED ( BadCombos[Column2] ) ) RETURN IF ( CALCULATE ( COUNTROWS ( Codes ), ALLEXCEPT ( Codes, Codes[ID] ), Codes[Data] = __badcode, Codes[Item] <> "Code1" ) > 0, "Missed Deletion" )If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat