- Returns all the rows in a table, or all the values in a column
- Removes context filters from columns and rows in the current query
- keeping filters that come from outside.
ALLSELECTED ([<tableName> or <columnName>])
|1||table||The name of table, this parameter is option and it cannot be an expression|
|2||column||The name of column, this parameter is option and it cannot be an expression|
So, Let’s start with an example, you can download the sample Dataset from below link
Now, create a Measure to using DAX ALLSELECTED function and in that measure do sum of ‘Sales’ column.
ALLSELECTED_DAX = CALCULATE(Sum(Orders[Sales]),ALLSELECTED(Orders[Product Sub-Category]))
According to ALLSELECTED definition, by default it returns the sum of total sales of all rows and after filters returns the sum of applied filters values, let’s have a look below two screen shots.
Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome.