Forum Discussion
PowerBI123456
6 years agoPost Partisan
Checking if right code was deleted
Hi, need some help and hopefully this makes sense. I have 2 different tables below. The first table is the data. The second table tells you the combination of codes that cannot exist together for the...
PowerBI123456
6 years agoPost Partisan
Hi - just seeing if anyone had any ideas, thanks again!
mahoneypat
6 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