FILTER DAX Function (Filter)

Returns a table that has been filtered.

Syntax

FILTER ( <Table>, <FilterExpression> )
Parameter Attributes Description
Table
Iterator

The table to be filtered.

FilterExpression
Row Context

A boolean (True/False) expression that is to be evaluated for each row of the table.

Return values

Table An entire table or a table with one or more columns.

A table containing only the filtered rows.

Remarks

FILTER can filter rows from a table by using any expression valid in the row context.
Thanks to context transition, using a measure in the filter expression it is possible to filter a table based on a dynamic calculation involving other rows and/or tables.

Related articles

Learn more about FILTER in the following articles:

  • Filtering Tables in DAX

    This article describes a number of techniques available to filter tables in DAX, showing possible pitfalls that you can avoid once you know them, in particular using bidirectional filters. One of the hardest things to do, when learning DAX, is to get rid of common sense reasoning and learn to follow a new set of […] » Read more

  • Context Transition and Filters in CALCULATE

    This article explains how the context transition interacts with the filter arguments of a CALCULATE function in DAX. This is important in order to avoid unexpected results with complex calculations made in filter arguments. » Read more

  • Filter Arguments in CALCULATE

    A filter argument in CALCULATE is always an iterator. Finding the right granularity for it is important to control the result and the performance. This article describes the options available to create complex filters in DAX. » Read more

Related functions

Other related functions are:

Last update: Dec 14, 2018   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

MSDN documentation: https://msdn.microsoft.com/en-us/query-bi/dax/filter-function-dax

DAX Conventions
Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Deprecated

This parameter is deprecated and its use is not recommended.

Contribute

Want to improve the content of FILTER? Did you find any issue? Please, report it us!
All submissions will be evaluated for possible updates of the content.