Optimizing OR condition measures

In this example a measure must be filtered by an OR condition on two columns from separate tables.

A FILTER() function cannot be avoided in this scenario like in the prior example, since multiple columns must be referenced in the same expression (the OR condition). For example, the following expression is not allowed: CALCULATE([Reseller Gross Sales], 'Product'[Product Subcategory] = "Mountain Bikes" || 'Reseller'[Reseller Country] IN {"United States", "Australia"})

The current measure is defined as follows:

Reseller Gross Sales (Filter OR) = CALCULATE([Reseller Gross Sales], FILTER('Reseller Sales',    RELATED('Product'[Product Subcategory]) = "Mountain Bikes" || RELATED('Reseller'[Reseller Country]) IN {"United ...

Get Microsoft Power BI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.