Forum Discussion

Selwynster's avatar
Selwynster
Helper II
8 years ago
Solved

Multi Select Slicer

 

I have a image below with a table (left) with 2 columns, and a slicer on the right.

Am i able to (using the slicer), find the date (Attribute) where ALL conditions are met?

In SQL terms, i need an 'AND' result, not 'OR' (which is what the slicer currently gives me).

So i need one date Attribute result, that has a 2, 6 and 9 Value.

Hope i am explaining myself correctly. 

 

  • Hi Selwynster,

     

    Please try a measure like below.

    Measure =
    VAR actualAmount =
        CALCULATE ( DISTINCTCOUNT ( Table1[Value] ), ALLSELECTED ( Table1[Value] ) )
    VAR selectedValues =
        CALCULATE (
            DISTINCTCOUNT ( Table1[Value] ),
            ALLSELECTED ( Table1[Value] ),
            ALL ( Table1[Attribute] )
        )
    RETURN
        IF ( actualAmount = selectedValues, 1, 0 )
    

    Multi_Select_Slicer

     

    Best Regards,

    Dale

11 Replies

  • Hi Selwynster

     

    Did you try using 3 slicers instead of one ? 

     

    Because when you select multiples values from a slicer it will display everything that has one the three at least 

     

    Else can you post here a sample of your data so that we try to solve the problem ?

     

    - Quentin

    • Selwynster's avatar
      Selwynster
      Helper II

      Hi  quentin_vigne

      Using 3 slicers does not work because when i select 1 option in the first slicer, it limits the other slicers immediately.

      The data i have is basically what is seen in the first table (on the left of the image.)

      Sorry, i am new here, so i not sure how to send the entire dataset.

      The end result i need would look like:

      1/2/2016      2

      1/2/2016      6

      1/2/2016      9

      (if that date has all the Values)

      I am not interested in dates that only have one of the 3 Values.

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Selwynster,

     

    Please try a measure like below.

    Measure =
    VAR actualAmount =
        CALCULATE ( DISTINCTCOUNT ( Table1[Value] ), ALLSELECTED ( Table1[Value] ) )
    VAR selectedValues =
        CALCULATE (
            DISTINCTCOUNT ( Table1[Value] ),
            ALLSELECTED ( Table1[Value] ),
            ALL ( Table1[Attribute] )
        )
    RETURN
        IF ( actualAmount = selectedValues, 1, 0 )
    

    Multi_Select_Slicer

     

    Best Regards,

    Dale

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-jiascu-msft,

      I have a silmilar issue, I tried the DAX you provided in this post but did not work for me. I have a map connected to the data and when I make a multiple selection, I want the selections made to display using AND feature and pop up in the map. Also I want the list of those to be displayed in a table. And the map color to be changed based on the filter selection combination (different color for different combination). I appreciate your support on this. Thank you.

      • v-jiascu-msft's avatar
        v-jiascu-msft
        Microsoft Employee

        Hi Anonymous,

         

        I would suggest you create a new post in this forum. It looks like a different scenario.

         

         

        Best Regards,