Number of open tasks over time

Hi all,

I would like to build a chart which shows the number of ‘open’ activities at a given day.

In our data activities are a combination of a task (e.g. modelling or testing), and a (lifecycle) status (e.g. ‘new’, ‘in progress’, ‘done’, ‘rejected’). I would like to plot per day the number of open tasks/activities of a certain type.

I currently have the activity timestamp aggregated to day as DIMENSION, and the following KPI:

MOVING_COUNT_DISTINCT(
CASE WHEN
MATCH_ACTIVITIES(NODE[‘Testing - In progress’] , EXCLUDING[‘Testing - Done’, ‘Testing - Rejected’] ) = 1
THEN “L33_V_MBD_INZICHTEN_STATUS”.“FEATUREAPGID”
ELSE NULL
END
,-999,0)

In (my?) theory this should use the activities up until the day, and then determine whether the case contains an open testing task or not. However, my current result is incorrect:

Which trick am I missing?
BTW: we’re on CPM4.6

Happy holidays! :slight_smile: :christmas_tree: :christmas_tree: :christmas_tree: