Forum Discussion
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 )Best Regards,
Dale
11 Replies
- quentin_vigneSolution Sage
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
- SelwynsterHelper II
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.
- quentin_vigneSolution Sage
Perhaps if you don't enable interactions between the 3 slicers it will work
On this guide you will find how to send sample of data
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Copy and paste your table from the data table here so that I can copy them right into my pbi desktop
- v-jiascu-msftMicrosoft 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 )Best Regards,
Dale
- SelwynsterHelper II
Wow, this works amazingly.
Thanks :smileyhappy:
- AnonymousNot 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-msftMicrosoft Employee
Hi Anonymous,
I would suggest you create a new post in this forum. It looks like a different scenario.
Best Regards,