Forum Discussion

PowerBI123456's avatar
PowerBI123456
Icon for Post Partisan rankPost Partisan
6 years ago
Solved

Match with a measure

Hi, I have 2 tables with a 1 to many relationship. The many table might not always have something from the table 1. How can I create a measure (not calculated column) and see which ones do have a match? 

  • Hi PowerBI123456 

    take a look at the following solution:

     

     

    Match in Table2 ? = 
    VAR _CurrentValue = MAX(Table1[Value])
    RETURN
        IF(CALCULATE(COUNTROWS(Table2),Table2[Value] = _CurrentValue) > 0 , "Yes", "No")

     

    With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
    FrankAT (Proud to be a Datanaut)

1 Reply

  • FrankAT's avatar
    FrankAT
    Icon for Community Champion rankCommunity Champion

    Hi PowerBI123456 

    take a look at the following solution:

     

     

    Match in Table2 ? = 
    VAR _CurrentValue = MAX(Table1[Value])
    RETURN
        IF(CALCULATE(COUNTROWS(Table2),Table2[Value] = _CurrentValue) > 0 , "Yes", "No")

     

    With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
    FrankAT (Proud to be a Datanaut)