Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Use AND predicate to slice data where the slicer data is coming from many side of the relationship

Let's say we have two tables A and B. Table A is on the 1 side, table B is on the many side.

 

If we add a slicer with a column from B and we are visualizing data from table A, we are not able to filter with AND predicate in the slicer if we select multiple values. Power BI uses OR by default. 

 

How can we configure the model so that when we filter on table B, to use AND predicate against table A?

 

Here's an example:

Table A is products table, where each row is a unique product with sales data.

Table B is attributes table, where one product can have multiple attributes. Each row in B is:

 - Product Id

 - Attribute Name

 - Attribute Value

 

What we want is, for example, to select two attributes and show products that have both attributes. Right now, we get products that have either the first, or the second or both the selected attributes.

 

Thanks!