runningSum also return NULL on NULL value

Hello everyone, i’m doing a visual that look kinda like this:

Simply listing every date of current month, value of each day and cumulative value. I’m calculation cumulative value using below calculated field:

runningSum(sum({value}),[truncDate("DD",{date}) ASC])

However, as you can see, even tho the value is NULL (because they’re future date, they won’t have value), cumulative value still return the same last value. I want cumulative value also return NULL if value is NULL. Is it possible to achieve this?

You can create another dimension that differentiates past months from future months and add it to the partition as shown below

runningSum(sum(Sales), [truncDate("DD",{Order Date}) ASC], [isFuture])

I got the below results where i qualified everything in 2023 as Future and the Future days had null for Sales


1 Like

Thank you, it worked! Thanks for fast solution!