ALLEXCEPT DAX Function
The ALLEXCEPT DAX function removes all context filters in the table except filters that have been applied on the specified columns which are specified in the ALLEXCEPT function.
DAX Syntax ALLEXCEPT(table, column[,column[,…]])
The function has the following parameters:
- table: The table over which all context filters are removed, except filters on those columns that are specified in subsequent arguments.
- column: The column for which context filters must be preserved.
Example: Here in the formula, we are specifying that the measure is going to be filtered only based on the Name field of the Sheet1 table.
DAX
Country Specific Measure = CALCULATE(SUM(Sheet1[10th Marks]), ALLEXCEPT(Sheet1, Sheet1[Name]))
In the above image we can see that the total measure value is shown in each row, it is not filtered on the basis of Country field of the table.
In the above image we can see that when I added the Name field to the table, the measure is going to be filtered.