FILTER DAX Function (Filter)

Returns a table that has been filtered.


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

The table to be filtered.

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.


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

  • FILTER vs CALCULATETABLE: optimization using cardinality estimation

    A common best practice is to use CALCULATETABLE instead of FILTER for performance reasons. This article explores the reasons why and explains when FILTER might be better than CALCULATETABLE. » Read more

  • From SQL to DAX: Filtering Data

    The WHERE condition of an SQL statement has two counterparts in DAX: FILTER and CALCULATETABLE. In this article we explore the differences between them, providing a few best practices in their use. » Read more

  • Applying a measure filter in Power BI

    This article describes how to use a measure to filter a Power BI visualization, and the different behaviors of a same filter between different visuals. » Read more

Related functions

Other related functions are:

Last update: Jan 11, 2021   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

MSDN documentation:

2018-2021 © SQLBI. All rights are reserved. Information coming from MSDN is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

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.


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.


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


This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.


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.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.