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.
Syntax:
ALLSELECTED ([<tableName>
or <columnName>])
Description:
table
- The name of table, this parameter is option and it cannot be an expression.
column - The name of column, this parameter is option and it cannot be an expression.
column -
Download the sample Dataset file from below link:
Now, create Measure to using DAX ALLSELECTED function
and in that measure we will calculate sum of ‘Sales’ column.
ALLSELECTED_DAX =
CALCULATE(Sum(Orders[Sales]), ALLSELECTED(Orders[Product Sub-Category]))
CALCULATE(Sum(Orders[Sales]), ALLSELECTED(Orders[Product Sub-Category]))
So, you can see here, it is showing summation of only filtered Product sub category sales values against each row.
Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome.
Comments
Post a Comment