Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Slicing two tables

Hello, I’m relatively new to DAX and struggling with the following, so any help would be greatly appreciated. Apologies, if this has been asnwered already, but I couldn't find anything similar.   I...
  • v-eachen-msft's avatar
    v-eachen-msft
    6 years ago

    Hi Anonymous ,

     

    You could try SELECTEDVALUE() function.

    Count=
    CALCULATE (
        COUNTA ( 'Table1'[Combination] ),
        FILTER (
            'Table1',
            SEARCH ( SELECTEDVALUE ( 'Table2'[ID] ), 'Table1'[Combination],, 0 )
        )
    )

    But I think the count of c should be 2 when you select x.