Cumulative sum chart conditional on date period

I have a database with our sales orders for a RaaS (Robots as a Service) product that involves leasing a certain amount of robots for a certain period to a customer. For each order, there is a Date property called “Rollout” with Rollout Start being the beginning of the rental period and Rollout End the end of the period.

So far I made a chart that accumulates the orders by “Rollout Start” (x axis) using “RUNNING_SUM(SUM([Robots]))” (y axis) to get the total cumulative sum aggregated with new orders each month and it works. However, I would like to subtract the robots when the Rollout End period comes so that I can see in the chart a measure of the robots that are planned to be out there in use. Can I achieve this using the fibery chart view?

Thanks in advance for the help

Have you tried a stacked chart using the TIMELINE([Rollout Start],[Rollout End]) function for your x-axis, and then use SUM([Robots]) as your y-axis?

I was writing a long response explaining how it didn’t work for me until I realised that in the chart creation I needed to use “Current data” and not “Historical data”. :sweat_smile:

Sorry for the basic question. This solved it all.

1 Like