- DAX Functions Tutorial
- DAX Functions - Home
- DAX Functions - Introduction
- DAX Parameter Naming Conventions
- Description Structure
- DAX Functions - Aggregation
- DAX Functions - Filter
- DAX Functions - Time Intelligence
- DAX Functions - Date and Time
- DAX Functions - Information
- DAX Functions - Logical
- Math & Trigonometric Functions
- DAX Functions - Parent & Child
- DAX Functions - Statistical
- DAX Functions - Text
- DAX Functions - Other
- DAX Functions Useful Resources
- DAX Functions - Quick Guide
- DAX Functions - Useful Resources
- DAX Functions - Discussion
DAX Filter - ALLSELECTED function
Description
ALLSELECTED function gets the context that represents all rows and columns in the query, while keeping explicit filters and contexts other than row and column filters.
This function can be used to obtain visual totals in queries.
Syntax
ALLSELECTED ([<tableName> | <columnName>])
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
tableName Optional. The name of a table. It cannot be an expression. |
2 |
columnName Optional. The name of a column, usually fully qualified. It cannot be an expression. |
Return Value
The context of the query without any column and row filters.
Remarks
ALLSELECTED function takes one or no arguments.
If there is one argument, the argument is either tableName or columnName.
This function is different from the function ALL () because it retains all filters explicitly set within the query, and it retains all context filters other than row and column filters.
Example
SumTotal:= CALCULATE (SUM (Sales[Sales Amount]),ALLSELECTED ())