Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

filter based on another report

Hi, I have a table Name Type Messi Football Messi Cricket Ronaldo Football Nemar Football I want names who only plays Football not both. Messi should not come. Expected output Name Type Rona...
  • v-lid-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    We can try to use the following measure in visual filter to meet your requirement:

     

    Visual Control =
    IF (
        CALCULATE ( DISTINCTCOUNT ( 'Table'[Type] ), ALL ( 'Table' ) )
            <> CALCULATE ( DISTINCTCOUNT ( 'Table'[Type] ), ALLSELECTED ( 'Table' ) ),
        IF (
            CALCULATE (
                COUNTROWS ( 'Table' ),
                FILTER (
                    CALCULATETABLE ( 'Table', ALL ( 'Table'[Type] ) ),
                    'Table'[Type] IN DISTINCT ( 'Table'[Type] )
                )
            )
                = CALCULATE (
                    COUNTROWS ( 'Table' ),
                    CALCULATETABLE ( 'Table', ALL ( 'Table'[Type] ) )
                ),
            1,
            -1
        ),
        1
    )

     


    Best regards,