Forum Discussion

RYU209's avatar
RYU209
Icon for Helper III rankHelper III
3 years ago
Solved

Check if a value exists between many-to-tables in Direct Query

Hello, I have two Direct Query tables with a Many-To-Many relationship (Table1 and Table2). They are connected by a key that is made up of a concatenated Transaction # and Order #.  I have a Ta...
  • johnt75's avatar
    3 years ago

    You could create a measure like

    Value is in Table1 =
    VAR CurrentKey =
        SELECTEDVALUE ( 'Table2'[concatenated key] )
    RETURN
        IF ( CurrentKey IN ALL ( 'Table1'[concatenated key] ), 1 )
    

    and then use that as a visual level filter to only show when the value is 1