cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Using OR Logic on 2+ Slicers to Populate Scatter Chart

I am looking for a way to make selections from 2 slicers to populate a scatter chart by utilizing OR logic, not AND logic.

Slicer A (Store List, Active stores)

Store 1

Store 2

Store 4

Slicer B (Store List, Inactive stores)

Store 3

Store 5

If I were to select Store 1 from Slicer A and Store 3 from Slicer B, I would want to see 2 dots on my Scatter Chart (their X/Y coordinates). I've simplified the scenario here and do need two separate slicers.

Please let me know what approach you would take. Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support

## Re: Using OR Logic on 2+ Slicers to Populate Scatter Chart

Hi @akarasick1 ,

We can use VALUES function not use SELECTEDVALUE function to meet your requirement. The new measure like this,

``````Measure =
var _select_SlicerA = VALUES('Slicer A'[Store List])
var _select_SlicerB = VALUES('Slicer B'[Store List])
return
IF(MAX('Table'[Store List]) in _select_SlicerA||MAX('Table'[Store List]) in _select_SlicerB,1,0)``````

The remaining steps are the same as before.

If you have any question, please kindly ask here and we will try to resolve it.

BTW, pbix as attached.

Best regards,

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Highlighted
Community Support

## Re: Using OR Logic on 2+ Slicers to Populate Scatter Chart

Hi @akarasick1 ,

You can create two tables, one contains active store, another contains inactive store. And create a slicer based on them.

Then you can refer the following steps based on our sample.

1. Create two tables to be slicer.

``Slicer A = CALCULATETABLE(DISTINCT('Table'[Store List]),'Table'[State]="Active stores")``
``Slicer B = CALCULATETABLE(DISTINCT('Table'[Store List]),'Table'[State]="Inactive stores")``

2. Then we can create a measure and put it in Filter on this visual.

``````Measure =
var _select_SlicerA = SELECTEDVALUE('Slicer A'[Store List])
var _select_SlicerB = SELECTEDVALUE('Slicer B'[Store List])
return
IF(MAX('Table'[Store List])=_select_SlicerA||MAX('Table'[Store List])=_select_SlicerB,1,0)``````

If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?

It will be helpful if you can show us the exact expected result based on the tables.

BTW, pbix as attached.

Best regards,

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Frequent Visitor

## Re: Using OR Logic on 2+ Slicers to Populate Scatter Chart

This looks great! How would I amend this to be able to handle multiple selections within the slicer - right now it only works with one selection.

Thank you!

Highlighted
Community Support

## Re: Using OR Logic on 2+ Slicers to Populate Scatter Chart

Hi @akarasick1 ,

We can use VALUES function not use SELECTEDVALUE function to meet your requirement. The new measure like this,

``````Measure =
var _select_SlicerA = VALUES('Slicer A'[Store List])
var _select_SlicerB = VALUES('Slicer B'[Store List])
return
IF(MAX('Table'[Store List]) in _select_SlicerA||MAX('Table'[Store List]) in _select_SlicerB,1,0)``````

The remaining steps are the same as before.

If you have any question, please kindly ask here and we will try to resolve it.

BTW, pbix as attached.

Best regards,

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

#### Community Summit North America – Join Online!

Join this community-driven Power Platform digital event for unbiased support and problem-solving.

#### Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

#### Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Top Solution Authors
Top Kudoed Authors