Filter by a measure with FILTER

Keep only the products that sold at least 220 units — a condition a simple column filter can’t express, but FILTER can.

You will learn to

  • Explain when a simple column filter is not enough
  • Pass a FILTER table to CALCULATE
  • Pick the right table to iterate: the one that holds the thing you are testing

How it works

A simple filter such as `Product[Price] > 500` can only test the values stored in a column. It can’t test a **measure**: `CALCULATE([Total Sales], [Total Quantity] >= 220)` is an error.

`FILTER(table, condition)` walks the table one row at a time and keeps the rows where the condition is true. Hand that table to CALCULATE and it becomes the filter. When the condition uses a measure, the measure is worked out for each row on its own, so `FILTER(Product, [Total Quantity] >= 220)` checks each product’s own units sold.

Iterate the table that holds what you are testing. You are asking about products, so use `Product`. `FILTER(Sales, …)` would ask about single order lines instead, and no single line comes close to 220 units.

Practice it hands-on with a real data model and a live report that updates as you type.

Big Customer Sales = CALCULATE([Total Sales], FILTER(Customer, [Total Sales] > 10000))