Skip to main content

Power BI

New

Slicer - AND/OR functionality

Vote (63) 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

ddb75bd4 88f6-4cbd-abf8-d213b9369439 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

f107bfc0 6ea7-46b4-aace-8c7270d979fa 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

25862105 e3d1-4e0f-9801-3260d42449bb 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

f4341f3e 8bb6-4027-b06e-a3d6603005d1 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

b719ba6d c48b-4703-8979-974cd92be792 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

e18056d8 a20a-4d16-b49c-aec37d9aeb68 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

36031852 2972-4b61-b94b-88e83f7fc689 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

666c26a5 254f-426b-a2f7-865a279fc755 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!