Forum Discussion
KD13
Helper I
3 years agoRolling Moving Sum issue with Blank Values
Hi All, i'm trying to calculate the cumulative sales of last 6 months by product but i'm facing a challenge with the months with no data. for example : in the below table, eventhpugh the 1st...
tamerj1
Community Champion
3 years agoHi KD13
I don't use time intelligence functions in my code. They don't seem intelligent to me but seems that this not the case for you. Going along with that I guess DATEADD is not the correct function to use in this case rather you can use DATESINPERIOD like
=
CALCULATE (
SUM ( Sales[Value] ),
DATESINPERIOD ( '00 -Calendar'[Date], MAX ( '00 -Calendar'[Date] ), -6, MONTH )
)