Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

See just rows in common

Hi guys,   It is a simple question, but I need your help. I have two facts tables. they have 3 common dimensions. Fact1 Fact2   Dimension1 Dimension2 Dimension3   I have a report using dime...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    You can create a measure as below and apply the visual-level filter to filter the data with the condition(Flag is 1😞

    Flag = 
    VAR _selcode =
        SELECTEDVALUE ( 'Client'[cod_clie] )
    VAR _tab1 =
        CALCULATETABLE (
            VALUES ( 'Fact1'[Cod_cli] ),
            FILTER ( 'Fact1', 'Fact1'[Cod_cli] = _selcode )
        )
    VAR _tab2 =
        CALCULATETABLE (
            VALUES ( 'Fact2'[Cod_cli] ),
            FILTER ( 'Fact2', 'Fact2'[Cod_cli] = _selcode )
        )
    RETURN
        IF ( _selcode IN _tab1 && _selcode IN _tab2, 1, 0 )

    Best Regards