Forum Discussion

rvcedd's avatar
rvcedd
Helper I
6 years ago
Solved

Duplicate filters on same page

Hello there,   I have the following requirement and I would appreciate your help I have a data model with 3 tables: Fact Table, Category Info and Location Info The user must be presented with 2 ...
  • v-easonf-msft's avatar
    6 years ago

    Hi , rvcedd 

    According to your description, you can try to follow these steps :

    1)Create two calculated table :

     

    slicer = DISTINCT(Table2[CategoryFullName])
    slicer2 = DISTINCT(Table2[CategoryFullName])

     

     2)Create two measures to display the average of Category Value:

     

    MeasureAvg1 =
    VAR SLICER1 =
        VALUES ( slicer[CategoryFullName] )
    RETURN
    CALCULATE ( [MeasureAvg], FILTER ( Table1, Table1[Column] IN SLICER1 ) )
    MeasureAvg2 =
    VAR SLICER2 =
        VALUES ( 'slicer 2'[CategoryFullName] )
    RETURN
    CALCULATE ( [MeasureAvg], FILTER ( Table1, Table1[Column] IN SLICER2 ) )

     

     

    3)Create  a new  measure to replace the value in the visual:

     

    Measure=
    VAR un =
        UNION (
            VALUES ( slicer[CategoryFullName] ),
            VALUES ( 'slicer 2'[CategoryFullName] )
        )
    RETURN
        IF (
            ISFILTERED ( slicer[CategoryFullName] )
                && ISFILTERED ( 'slicer 2'[CategoryFullName] ),
            CALCULATE ( [MeasureAvg], FILTER ( Table1, Table1[Column] IN un ) ),
            BLANK ()
    )

     

    Here is a sample:

     

     

    Url:  https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EZ7xuKLmYolJuf3by11UdjoBJMYe5F9bps1_qfqiFCjMCw?e=x0fhMU

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.