MOVING_SUM using number of process variants

Hi, thank you for dropping by this topic. :slight_smile:

I’m trying to use KPI Format as Start of MOVING_SUM.
MOVING_SUM(COUNT_TABLE("_CEL_SD_ACTIVITIES_CASES"), KPI("Number of process variants") *-1,0)

This KPI returns me an error: that start parameter should be an integer, which I firmly believe I am giving it integer. Using COUNT DISTINCT instead has not solved this situation btw.
This should show the same result as the formula below.


Solved, when you use variant.

Hi Fidy,

You’re using ‘-1’ in your answer. Is this correct or should it be a positive 1?

Hi joosbuijs,

‘-1’ is actually correct usage, if you want to start accumulating the sum one number before, you may give ‘-1’ to the second variant.
I want to achieve in a line chart the gradual accumulation as the line goes to the right side, that is why I need to have SUM from negative numbers of starting point.