Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
This is my second post on this topic I hope I will get an answer as I didn't receive any for the previous one,
My issue is with the multi-select slicer should be conditioned
some values in my slicer should not be selected together example:
The slicer column is a distinct value:
A
B
C
D
E
the logic I need to apply is:
If A and or B is selected whether alone or with others but not D, then hide or remove D, and vice versa if D is selected then remove or hide A and B whether D is selected alone or with others
any help will be appreciated.
Hello @NourJ,
Create a measure that checks if the selected values in the slicer contain either "A" or "B" and if they do, the measure will remove "D" from the selection. Similarly, if the selected values contain "D", the measure will remove "A" and "B" from the selection.
Selected Values =
VAR SelectedValues = VALUES(Table[Column])
RETURN
IF (
CONTAINSSTRING(CONCATENATEX(SelectedValues, Table[Column], ","), "A")
|| CONTAINSSTRING(CONCATENATEX(SelectedValues, Table[Column], ","), "B"),
EXCEPT(SelectedValues, VALUES(Table[Column]), VALUES(Table[Column]) = "D"),
IF (
CONTAINSSTRING(CONCATENATEX(SelectedValues, Table[Column], ","), "D"),
EXCEPT(SelectedValues, VALUES(Table[Column]), VALUES(Table[Column]) IN {"A", "B"}),
SelectedValues
)
)
I hope this helps! Let me know if you have any further questions.
It doesn't work unforturnatly
| User | Count |
|---|---|
| 53 | |
| 42 | |
| 32 | |
| 15 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 72 | |
| 37 | |
| 27 | |
| 24 |