Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Polo87
Frequent Visitor

How to apply 2 filters on visual but with OR condition beetwen filters

Hello,

 

I have Matrix Visual where I put some measures.

 

I would like to put Filters only to this visual but I need do this based on 2 columns - lets say Assignee and CreatedBy.

What I am looking for is to filter in this logic. I need all rows to be considered  Where (Assignee is UserA or UserB) OR (CreatedBy is UserA or UserB). I tried with Filters pane as below but it looks like works as AND between filters so : (Assignee is UserA or UserB) ABD (CreatedBy is UserA or UserB). How to achieve OR ? 🙂

Zrzut ekranu 2024-03-11 o 14.09.52.png

Zrzut ekranu 2024-03-11 o 14.12.21.png

5 REPLIES 5
PijushRoy
Super User
Super User

Hi @Polo87 

Create a Measure

 

Measure = SWITCH(
TRUE(),
Table[Assignee] IN {"UserA","UserB} || Table[CreatedBy] IN {"UserA","UserB},1,0)

 

Use this measure in filter pane and set value as 1



Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





@PijushRoy 

I got error:

A single value for column 'AssignedTo.UserEmail' in table 'Query1' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

 

 

 

There is only one value there. For example "Name Surname"

Hi @Polo87 

Can you please share screenshot if the data and error message




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





@PijushRoy 

Zrzut ekranu 2024-03-11 o 15.05.19.png

Zrzut ekranu 2024-03-11 o 15.04.46.png

  I tried also with other columns. There is also such error.

Hi @Polo87 

Check this

Measure = VAR _Assign = SelectedValue(YourTable[Assignee])
VAR _CreatedBy = SelectedValue(YourTable[CreatedBy])
RETURN
SWITCH(
TRUE(),
_Assign IN {"UserA","UserB"} || _Assign IN {"UserA","UserB"},1,0)



Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.