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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.