Forum Discussion
What is wrong with my DATEADD
Does anyone know why neither of these are working? They are returning the Total sum with no date filtered.
Prior Quarter Total COGS = CALCULATE([Total COGS], DATEADD('Calendar'[Date], -1, QUARTER) )
Prior Month Total COGS = IF([Total COGS], CALCULATE([Total COGS], DATEADD('Calendar'[Date], -1, MONTH) ) )
3 Replies
- v-gizhi-msft
Community Support
- Greg_Deckler
Community Champion
Very difficult to say, your [Total COGS] could be a measure and have an ALL in it? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- mwegener
Most Valuable Professional
Hi wbridwell79 ,
if the calendar is not filtered, all calendar entries will be shifted by the interval.
Since you probably have more calendar entries than assigned facts, it looks as if all values are returned.