ALWAYSAPPLY DAX Function (Filter)

Modifies how filters are applied while evaluating a GROUPCROSSAPPLY or GROUPCROSSAPPLYTABLE function.

Syntax

ALWAYSAPPLY ( <TableExpression> )
Parameter Attributes Description
TableExpression

Any table expression.

Return values

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

Remarks

This function is mainly used internally by Power BI to query remote models in composite models.

You use ALWAYSAPPLY within the context GROUPCROSSAPPLY and GROUPCROSSAPPLYTABLE functions, to override the standard behavior of those functions.

By default, a value filter does not affect measure if it doesn’t change filter context. This behavior can be controlled by ALWAYSAPPLY function so that an empty table can still affect measure even if it doesn’t change filter context.

» 2 related functions

Examples

-- Illustrative syntax only (internal Power BI / composite model pattern).
-- ALWAYSAPPLY makes the filter table affect the measures
-- even when it does not change the filter context, for example an empty table.
-- Not evaluated on dax.do: GROUPCROSSAPPLY targets remote/composite query shapes.
EVALUATE
GROUPCROSSAPPLY (
    'Product'[Color],
    ALWAYSAPPLY ( FILTER ( VALUES ( 'Product'[Color] ), FALSE ) ),
    "Sales", [Sales Amount]
)

Related functions

Other related functions are:

Last update: Oct 19, 2026   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://learn.microsoft.com/en-us/dax/alwaysapply-function-dax

2018-2026 © 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.

Passed by Expression

This parameter is passed by expression and can be evaluated multiple times in different evaluation contexts.

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.

Volatile

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

Deprecated

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.

Contribute

Want to improve the content of ALWAYSAPPLY? 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.