Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Help Using One Slicer for 3 columns

I am trying to filter my data with 1 slicer across 3 columns.  The data I have looks like this:   Project Color 1 Color 2 Color 3 1 Red Blue Green 2 Green Yellow   3 Blue Gre...
  • v-jiascu-msft's avatar
    7 years ago

    Hi Anonymous ,

     

    Please download the demo from the attachment and try it.

    1. Create a new table. DO NOT establish any relationship.

    Colors =
    FILTER (
        DISTINCT (
            UNION (
                VALUES ( Table1[Color 1] ),
                VALUES ( Table1[Color 2] ),
                VALUES ( Table1[Color 3] )
            )
        ),
        [Color 1] <> BLANK ()
    )
    

    2. Create a measure.

    Measure =
    VAR _colors =
        VALUES ( Colors[Color] )
    RETURN
        IF (
            MIN ( Table1[Color 1] ) IN _colors
                || MIN ( Table1[Color 2] ) IN _colors
                || MIN ( Table1[Color 3] ) IN _colors,
            1,
            BLANK ()
        )
    

    3. Add the measure into the Visual Level Filter and filter out the blanks.

    Help-Using-One-Slicer-for-3-columns

     

    Best Regards,