Forum Discussion
mb0307
5 years agoResponsive Resident
Find duplicate
Hi all,
Table:
I would like to create a Calculated Column, RESULT, if:
CODE in MIN(CATEGORY) is duplicated in any other CATEGORY (which should be greater than MIN CATEGORY) then fill "Duplicate" otherwise "Original".
Please note how last CODE 9999 is not in CATEGORY 1 so shown as "Original".
Thanks
I broke this up into 2 steps to show how the logic works...
First Column is your MIN Category BY Code:
Column_MinCatbyCode = CALCULATE( MIN ('Dup-Orig'[Category]), FILTER(ALLEXCEPT('Dup-Orig', 'Dup-Orig'[Code]), TRUE()))Now we just compare the two columns:Column = IF('Dup-Orig'[Column_MinCatbyCode] = 'Dup-Orig'[Category], "Original", "Duplicate")
1 Reply
- fhillResident Rockstar
I broke this up into 2 steps to show how the logic works...
First Column is your MIN Category BY Code:
Column_MinCatbyCode = CALCULATE( MIN ('Dup-Orig'[Category]), FILTER(ALLEXCEPT('Dup-Orig', 'Dup-Orig'[Code]), TRUE()))Now we just compare the two columns:Column = IF('Dup-Orig'[Column_MinCatbyCode] = 'Dup-Orig'[Category], "Original", "Duplicate")