Forum Discussion

icturion's avatar
icturion
Icon for Resolver II rankResolver II
7 years ago
Solved

Check if columns Exists in other Table

Hi,

 

i'm trying to make a DAX code that checks whether a value from table x also exists in table y. if so then YES else NO

 

this is what i got so for

calculated column = LOOKUPVALUE(tableY[columnY];'tableX'[columnX]
 
thx
regards
icturion
  • You could do this with LOOKUPVALUE, but I would suggest using CONTAINS.

     

    CalcColumn = IF( 
        CONTAINS(tableY, tableY[columnY], tableX[columnX] ), 
        "Yes", "No")

1 Reply

  • Cmcmahan's avatar
    Cmcmahan
    Icon for Resident Rockstar rankResident Rockstar

    You could do this with LOOKUPVALUE, but I would suggest using CONTAINS.

     

    CalcColumn = IF( 
        CONTAINS(tableY, tableY[columnY], tableX[columnX] ), 
        "Yes", "No")