# Cumulative sum chart conditional on date period

**URL:** https://community.fibery.io/t/cumulative-sum-chart-conditional-on-date-period/8913
**Category:** Misc
**Created:** [June 2, 2025, 5:12pm UTC](https://community.fibery.io/t/cumulative-sum-chart-conditional-on-date-period/8913 "2025-06-02T17:12:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Fernando\_German\_Tora](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/fernando_german_tora/32/11398_2.png) [@Fernando\_German\_Tora](https://community.fibery.io/u/Fernando_German_Tora)
#### Post date: [June 2, 2025, 5:12pm UTC](https://community.fibery.io/t/cumulative-sum-chart-conditional-on-date-period/8913/1 "2025-06-02T17:12:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [June 2, 2025, 11:06pm UTC](https://community.fibery.io/t/cumulative-sum-chart-conditional-on-date-period/8913/2 "2025-06-02T23:06:02Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Fernando\_German\_Tora](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/fernando_german_tora/32/11398_2.png) [@Fernando\_German\_Tora](https://community.fibery.io/u/Fernando_German_Tora)
#### Post date: [June 3, 2025, 5:45am UTC](https://community.fibery.io/t/cumulative-sum-chart-conditional-on-date-period/8913/3 "2025-06-03T05:45:23Z")

</div>

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”. 😅

Sorry for the basic question. This solved it all.

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [June 3, 2025, 6:34am UTC](https://community.fibery.io/t/cumulative-sum-chart-conditional-on-date-period/8913/4 "2025-06-03T06:34:37Z")

</div>


