SumOver but only for the current periods

Hi there, I try to build cumulative value in QS which will be “zeroed” in periods which are in the future.

Currently, I have something like this (built with periodToDateSumOverTime):

Value Cumulative
Jan 15 15
Feb 20 35
Mar 25 60
Apr 30 90
May 4 94
Jun 16 110
Jul 0 110
Aug 0 110
Sep 0 110
Oct 0 110
Nov 0 110
Dec 0 110

But the goal is to have this:

Value Cumulative
Jan 15 15
Feb 20 35
Mar 25 60
Apr 30 90
May 4 94
Jun 16 110
Jul 0 0
Aug 0 0
Sep 0 0
Oct 0 0
Nov 0 0
Dec 0 0

Any solutions?

I’m not sure but may be you can try ifelse() and check if it works for you or not.
ifelse(value,periodToDateSumOverTime(aggregated measure, date, period),0)

Hi, @Przemk00. Did @Swapnil’s solution work for you? I am marking their reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community Q&A Forum!