ALLSELECTEDREMOVE DAX Function (Filter)
Modifies how filters are applied while evaluating a GROUPCROSSAPPLY or GROUPCROSSAPPLYTABLE function.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| TableExpression |
Any table expression. |
|
| Column | Optional Repeatable |
Column in the table expression. |
Return values
Remarks
This function is mainly used internally by Power BI to query remote models in composite models.
You use ALLSELECTEDREMOVE within the context GROUPCROSSAPPLY and GROUPCROSSAPPLYTABLE functions, to override the standard behavior of those functions.
When doing ALLSELECTED on a column that appears on the list of ALLSELECTEDREMOVE column parameter, then this column from this table expression will not participate in the filter context. The same column from other table expression in the filter context is not changed.
It is possible to specify a subset of columns of the table expression. When no column is supplied, then it’s equivalent to supplying all columns of the table expression to ALLSELECTEDREMOVE.
Examples
-- ALLSELECTEDREMOVE hides the filter on Product[Color] from ALLSELECTED.
-- ALLSELECTED then ignores the Red and Blue filter of this table expression,
-- so All Selected returns the sales of all the colors.
EVALUATE
GROUPCROSSAPPLY (
'Product'[Color],
ALLSELECTEDREMOVE ( TREATAS ( { "Red", "Blue" }, 'Product'[Color] ) ),
"Sales", [Sales Amount],
"All Selected", CALCULATE ( [Sales Amount], ALLSELECTED ( 'Product'[Color] ) )
)
| Color | Sales | All Selected |
|---|---|---|
| Blue | 2435444.61749997 | 30591343.9773999 |
| Red | 1110102.10439999 | 30591343.9773999 |
-- Without ALLSELECTEDREMOVE, ALLSELECTED restores the Red and Blue filter,
-- so All Selected returns the sales of Red and Blue only.
EVALUATE
GROUPCROSSAPPLY (
'Product'[Color],
TREATAS ( { "Red", "Blue" }, 'Product'[Color] ),
"Sales", [Sales Amount],
"All Selected", CALCULATE ( [Sales Amount], ALLSELECTED ( 'Product'[Color] ) )
)
| Color | Sales | All Selected |
|---|---|---|
| Blue | 2435444.61749997 | 3545546.72189996 |
| Red | 1110102.10439999 | 3545546.72189996 |
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/allselectedremove-function-dax