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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
gluizqueiroz
Resolver I
Resolver I

How to filter 2 different columns using "OR" in Power BI Embedded with JS

const basicFilter = { 
	$schema: "https://powerbi.com/product/schema#basic", 
	target: { 
		table: "Store", 
		column: "Salesperson" 
	}, 
	operator: "In", 
	values: [202], 
	filterType: models.FilterType.BasicFilter, 
	requireSingleSelection: true 
}


Im using this type of filter when embedding a Power BI Report using JS API.
Now, I filter the column "Salesperson" only, from table "Store".
But now, I need to change this, I need to do this following logic:

Table: Store
Column: Salesperson
Values: [202]

OR

Table: Store
Column: Manager
Values: [202]


Because, the user = 202, has registers when he was "salesperson" and registers when he was "manager" and I need to show both results.
How can I achive this "OR" in Power BI Embedded API JS?

1 ACCEPTED SOLUTION
v-venuppu
Community Support
Community Support

Hi @gluizqueiroz ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @lbendlin for the prompt response.

You can apply an OR filter across two different columns in Power BI Embedded by using an Advanced Filter. Basic Filters only allow filtering one column at a time, but Advanced Filters support combining conditions with OR logic.

In your case, you would create one advanced filter that contains:

Condition 1: Store[Salesperson] = 202

Condition 2: Store[Manager] = 202

Logical operator: OR

When applied, the report will show all rows where the user is either a salesperson or a manager, without needing any changes to your data model or calculated columns.

 

View solution in original post

4 REPLIES 4
v-venuppu
Community Support
Community Support

Hi @gluizqueiroz ,

May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

Thank you.

v-venuppu
Community Support
Community Support

Hi @gluizqueiroz ,

I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

Thank you.

 

v-venuppu
Community Support
Community Support

Hi @gluizqueiroz ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @lbendlin for the prompt response.

You can apply an OR filter across two different columns in Power BI Embedded by using an Advanced Filter. Basic Filters only allow filtering one column at a time, but Advanced Filters support combining conditions with OR logic.

In your case, you would create one advanced filter that contains:

Condition 1: Store[Salesperson] = 202

Condition 2: Store[Manager] = 202

Logical operator: OR

When applied, the report will show all rows where the user is either a salesperson or a manager, without needing any changes to your data model or calculated columns.

 

lbendlin
Super User
Super User

Create a calculated column  [SalesPerson] & "|" & [Manager].

Use PATHCONTAINS  with your search criteria.

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.