Forum Discussion
Regarding the DATEADD working with modifier ALL('Date')
Hi all,
I have a normal model with 'Date' and 'Sales' tables. And I have 3 measures,
- The first one is Sales Amount := SUMX('Sales', [Quantity] * [Net Price])
- The second one is Sales AllDate := CALCULATE( [Saltes Amount], ALL('Date'))
- The last one is Sales PM in AllDate := CALCULATE( [Saltes Amount], DATEADD('Date'[Date], -1 ,MONTH), ALL('Date'))
I put them in a matrix, but I don't understand the behavior of the last measure, why the ALL modifier doesn't remove the filter of DATEADD? It's like the measure of CALCULATE( [Saltes Amount], DATEADD('Date'[Date], -1 ,MONTH))
Could someone please explain it to me. Thanks!
Becuase it is not supposed to. It only removes the outer filter which is then replaced by the inner filter. However, it is mostly useless to have ALL along with DATEADD as it removes the filter automatically from the date table.
2 Replies
- tamerj1
Community Champion
Becuase it is not supposed to. It only removes the outer filter which is then replaced by the inner filter. However, it is mostly useless to have ALL along with DATEADD as it removes the filter automatically from the date table.