Forum Discussion

mb0307's avatar
mb0307
Responsive Resident
5 years ago
Solved

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 "...
  • fhill's avatar
    5 years ago

    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")