CALCULATETABLE DAX Function (Filter)  Context Transition

Evaluates a table expression in a context modified by filters.


CALCULATETABLE ( <Table> [, <Filter> [, <Filter> [, … ] ] ] )
Parameter Attributes Description

The table expression to be evaluated.

Filter Optional

A boolean (True/False) expression or a table expression that defines a filter.

Return values

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

The value is the result of the expression evaluated in a modified filter context.


Every filter argument can be either a filter removal (such as ALL, ALLEXCEPT, ALLNOBLANKROW), a filter restore (ALLSELECTED), or a table expression returning a list of values for one or more columns or for an entire expanded table.

When a filter argument has the form of a predicate with a single column reference, the expression is embedded into a FILTER expression that filters all the values of the referenced column. For example, the predicate shown in the first expression is internally converted in the second expression.

    table[column] = 10

    FILTER ( 
        ALL ( table[column] ),
        table[column] = 10

A filter argument overrides the existing corresponding filters over the same column(s), unless it is embedded within KEEPFILTERS.

CALCULATETABLE follow the same steps of CALCULATE to evaluate its result.

» 6 related articles
» 1 related function


CALCULATETABLE is identical to CALCULATE, except for the result: it returns a table instead of a scalar value.

-- Returns the colors of Proseware branded products
    VALUES ( 'Product'[Color] ),
    'Product'[Brand] = "Proseware"

Related articles

Learn more about CALCULATETABLE in the following articles:

Related functions

Other related functions are:

Last update: Jul 12, 2024   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation:

2018-2024 © SQLBI. All rights are reserved. Information coming from Microsoft documentation 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.


A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.


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 CALCULATETABLE? 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.