Using Logical OR Conditions With DAX

Marco Russo shows how to create multiple slicers with logical OR (rather than the default AND) conditions in Power BI and Excel:

Usually, the logical AND condition is the expected behavior for scenarios with different slicers. However, there could be cases where there is a need for a logical OR condition between several slicers. In our example, the semantic would be, “show the quantity sold of products that are of brand Contoso or that have been sold to customers who have a Professional occupation”. The measures OR #1, OR #2, and OR #3 show the same result obtained with three different techniques.

The first two techniques are best practices and might provide different performance depending on the data distribution. The third technique is usually a bad idea because it implements a table filter rather than a multi-column filter. It is included for informational purposes, and as an example of what not to do in production code.

It’s not trivial, but it’s possible.

Related Posts

Joining Tables In DAX

Marco Russo bridges a gap in moving from SQL to DAX: The SQL language offers the following types of JOIN: INNER JOIN OUTER JOIN CROSS JOIN The result of a JOIN does not depends on the presence of a relationship in the data model. You can use any column of a table in a JOIN […]

Read More

Getting Month Names Given Numbers In DAX

Philip Seamark shows how to convert month numbers into names in Power BI: The most common solution I see offered is along the lines of a SWITCH statement that lists 12 conditions (one for each month).   This works, but can also be done using existing functions. While DAX lacks a dedicated function to convert a […]

Read More


April 2018
« Mar May »