Reputation: 9724
Today I had a colleague tell me that ALL(Date table[date]), that is - removing the filter from the date column of a date table results in automatic filter removal from all date table columns.
I tried this using a Year slicer, and following measure is displayed in a card visual: CALCULATE(SUM(SALES[AMT]), ALL(DATETABLE[DATE])
Now when I select the Year in the slicer, then the measure shows me sales in the year. So removing filter over date column of a date table doesn't result in filter removal from all columns of date table. Is this correct or am I missing something.
Upvotes: 0
Views: 31
Reputation: 1124
The All()
function needs to be applied to the exact column that is being used to filter. So, if you are using the Year from your DateTable Date column you need to use the DATETABLE[DATE].[YEAR]
column.
Your updated measure:
CALCULATE(SUM(SALES[AMT]), ALL('DATETABLE'[DATE].[Year]))
If you want to ensure that no column on the DATETABLE affects your visual, then use this measure:
CALCULATE(SUM(SALES[AMT]),REMOVEFILTERS('DATETABLE'))
The REMOVEFILTERS()
function will remove all filters from the DATETABLE table no matter the column used in the slicer.
Upvotes: 0