Skip to main content

Power BI

Needs Votes

Slicer - AND/OR functionality

Vote (65) Share
Tomaž Silič's profile image

Tomaž Silič on 23 Sep 2016 17:43:35

If you select one or more items in the slicer the data shown to you is filtered by OR condition between all the selections. It would be really useful if we can change this to AND condition as well.
Example:
If you have items which are tagged with some tags and you want to find all items which include ALL of the tags or ONE of the tags, you would simply put all the tags in the slicer and change between AND and OR condition.

Comments (8)
Tomaž Silič's profile image Profile Picture

Edin on 05 Jul 2020 23:50:09

RE: Slicer - AND/OR functionality

In addition to Will's solution, if you have a requirement where you need to display the 'filtered' data by used AND conditioning here is a nice solution for that

https://medium.com/seismic-data-science/changing-or-to-and-logic-for-power-bi-slicers-1a6b20aee5f5

Tomaž Silič's profile image Profile Picture

Abhishek on 05 Jul 2020 23:27:38

RE: Slicer - AND/OR functionality

This is indeed a requirement for the use case where external data provided is adding values, having multiple slicer will not solve this issue as each time to reflect the data value change we need to add more slicers.

If we get this and condition in single slicer irrespective with change of data the selections will derive the desired results.

Thanks.

Tomaž Silič's profile image Profile Picture

anonymous on 05 Jul 2020 23:25:06

RE: Slicer - AND/OR functionality

Hi Will, That helped us a lot.
Is there a way that when we change the slicer option into AND, the report also should view the AND data instead of OR.
Is there any way to do it.
Please let me know.

Tomaž Silič's profile image Profile Picture

Shad on 05 Jul 2020 22:50:08

RE: Slicer - AND/OR functionality

This is a greatly needed addition.

For Slicer, Attribute Slicer, Chiclet, or SmartFilter by SQLBI it would be fantastic and solve many needs.

Tomaž Silič's profile image Profile Picture

Peter Nuttall on 05 Jul 2020 22:48:53

RE: Slicer - AND/OR functionality

This is something we have struggled to implement elegantly and consistently.
A simple AND/OR switch in slicers would be a simple implementation of this idea.

Tomaž Silič's profile image Profile Picture

jerome P on 05 Jul 2020 22:34:23

RE: Slicer - AND/OR functionality

good idea, working in many-many scenarrio (or in reverse relationship mode). this can simplify most common basket analysis needs.
will be powerfull in direct query mode.

Tomaž Silič's profile image Profile Picture

Jamal on 05 Jul 2020 22:34:19

RE: Slicer - AND/OR functionality

Dear thompson, i have one big issue facing since last 45 days. I have reinstslled windows 7, but after that in power bi visualization is not appearing. Edit query work well but after loading power bi desktop shows " can't display the visual." I am sure u are core member and can fix the problem. Regards, jamal qamar

Tomaž Silič's profile image Profile Picture

Will Thompson on 05 Jul 2020 22:32:38

RE: Slicer - AND/OR functionality

You can work around this with some DAX... Not ideal I realise, but take a look at my example here: https://1drv.ms/u/s!AhrHQG3fCq7Rsu0Z8MhPKuWN3nkt6A

HTH!