Forum Discussion

gluizqueiroz's avatar
gluizqueiroz
Icon for Resolver I rankResolver I
9 months ago
Solved

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.Filt...
  • v-venuppu's avatar
    9 months ago

    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.