OR across two columns: bikes or anything red
Commas in CALCULATE mean AND. Write one filter with || to get bikes or red products, without counting the red bike twice.
You will learn to
- Write an OR condition across two columns of the same table
- Explain why adding two filtered measures can double count
- Know when an OR across two tables needs FILTER
How it works
Filters separated by commas must **all** be true, so `Product[Category] = "Bikes", Product[Color] = "Red"` means red bikes only. To mean “this **or** that” across two different columns, put both tests in **one** filter joined by `||` (or).
Adding two measures together looks like OR, but anything that matches both tests is counted twice. Road-150 is a red bike, so it would land in the bike total and the red total.
A single filter may use several columns, but only from **one table**. `Product[Category] = "Bikes" || Customer[Segment] = "Business"` mixes Product and Customer, so CALCULATE refuses it. For that you would iterate Sales: `FILTER(Sales, RELATED(Product[Category]) = "Bikes" || RELATED(Customer[Segment]) = "Business")`.
Practice it hands-on with a real data model and a live report that updates as you type.
Clothing or Silver Sales = CALCULATE([Total Sales], Product[Category] = "Clothing" || Product[Color] = "Silver")