Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Comparing columns, marking duplicates

Good Morning,

I have 2 tables, each has a column with a list of numbers and I am trying to compare the columns and show which numbers appear in both tables. The 2 tables have a M2M relationship so RELATED isn't working well. I attempted to create a bridge table to help, but no luck either. I've tried searching but can't quite ge t

  • Anonymous Try this. PBIX attached below signature.

    Duplicate = 
        VAR __Value = [Column2]
        VAR __Second = ALL('Table (2)'[Column2])
        VAR __Result = IF(__Value IN __Second,1,0)
    RETURN
        __Result

     

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Try this. PBIX attached below signature.

    Duplicate = 
        VAR __Value = [Column2]
        VAR __Second = ALL('Table (2)'[Column2])
        VAR __Result = IF(__Value IN __Second,1,0)
    RETURN
        __Result