Forum Discussion
Custom filter/slicer
Hi. In my dashboard, on the first page a have a number of slicers available to users. Ideally I want to be able to use 2 slicers at once, so slicer one is Fruit name and I choose Apple, slicer 2 is Banana.
Ideally I would want my report to show anything that has Apple OR Banana, but it only returns where it has both.
Is there a way I can create something, such as a button using DAX, to apply the filter but allow Apple or Banana?
Sorry for the delay in response, I have attached you a solution proposal if I understood your requirement correctly.
I just unpivoted the Y/N columns to have a single one and use AND, OR options with a slicer.
5 Replies
- ray_aramburoSuper User
You don't need to split the slicers in 2. Just change the setting of the slicer to turn off "Multi select with CTRL". Then select only in your slicer Apple and Banana and publish that as default or save the state of the slicer with a bookmark.
Now, if the fruits are in different columns then it's a whole different case and my recommendation would be to change your data structure to have all of them in a single column or use a dimension table with the fruits catalog.
- DanielwoodHelper I
Hi, thanks for the response. I'm afraid this is where the problem gets a bit more complicated.
In my example above I didn't explain the live data accurately. What I have are a number of columns which are system impacts, so on row 1, across multiple columns, are different system names. Below that are simple Y or N options.
So on an individual basis, I have a slicer for each system. But the issue arises if I want to use a slicer that is system A or system B as an example.
- ray_aramburoSuper User
Can you share a sample of the table? It can be replaced/dummy data but I just want to get an accurate picture of its current state
- DanielwoodHelper I
Hi, sorry for slow reply. I've not been able to load dummy data, but here is an example of what it would look like
Asset Keyboard screen mouse laptop Y N N pc Y Y Y mac Y Y N switch N Y N So if i selected a filter on Keyboard = Y i would expect the 3 returns. If i selected keyboard and screen, currently i would only see PC and MAC, assuming i selected the Kayboard slicer first.
But what i would actually want to see is a list of all 4 items.
Does that make sense?
- ray_aramburoSuper User
Sorry for the delay in response, I have attached you a solution proposal if I understood your requirement correctly.
I just unpivoted the Y/N columns to have a single one and use AND, OR options with a slicer.