Forum Discussion

rogerdea's avatar
rogerdea
Icon for Helper IV rankHelper IV
3 years ago
Solved

Rolling 12 month issue

I have used DAX to do a rolling 12 month sum, but have a rogue value, which i think is where one of the months has no data value (see image, its month 2021-01).

 

How can i get around this so that it includes the blank in the 12M sum? (column B in the image)  I already tried added IF(ISBLANK to te DAX but it didn't seem to help.

 

 

My DAX is:

 

R12M Sum =
CALCULATE(
    SUM( Data[Amount] ),
    DATESINPERIOD(DateTable[Date], MAX(Data[DateTime] ), -12,  MONTH )
)

2 Replies