Cheat Sheets/Power BI/FILTER
DAX function

FILTERDAX function reference

Return rows matching a condition.

Syntax

dax
FILTER(<table>, <condition>)

Examples

dax
FILTER(Sales, Sales[Amount] > 1000)
A table

FILTER is needed here because the condition compares two columns, which a simple boolean filter argument can't express.

dax
CALCULATE(SUM(Sales[Amount]), FILTER(Sales, Sales[Amount] > RELATED(Product[TargetPrice])))
Sum of orders sold above the product’s target price

Pairs FILTER with ALL to build a modified filter that ignores the report’s current selection.

dax
FILTER(ALL(Product), Product[Category] = "Bikes")
All Bikes products, ignoring the visual's own category filter

Common mistakes & gotchas

Related DAX functions

From Filter context

Used in these tutorials

← Back to the Power BI (DAX) cheat sheet