FILTER – filters in DAX (DAX – Power Pivot, Power BI)
Functions, that restricts table to some rows only. These selected rows can be provided to other functions to calculate a measure.
In this sample table, we can calculate Revenue for Strawberry ice cream only:
- Strawberry ice cream revenue = CALCULATE(
SUM('Table'[Revenue]);
FILTER('Table';'Table'[Item]="Strawberry ice cream"))
Because:
- CALCULATE puts SUM and FILTER together
- SUM declares summarizing
- FILTER restrict summarizing to "Strawberry ice creams" only.