I’m guessing I can add a column with a formula, which maybe takes the value for that month and adds it to the value for the previous month, but I’m not quite clever enough to work out how.
Thanks.
(sorry for the combination of links and embedded images, apparently as I new user, there are some limits to what I can do)
Is this what you were looking for ?
(Look at the green line in the chart called [View of Data] in the sample down below )
If yes, the formula I used in the Data table (you’ll find below the chart) in the field called [Cumulative Usage Sum] is:
Data.Filter(
Month <= thisRow.Month
).Usage.Sum()
(Note that Month is in fact CurrentValue.Month)
And what it does is :
It takes the whole list of rows the Data table is and from that whole list of rows (each row in the list being stored as/represented by CurrentValue), I ask Filter() to only keep the rows where CurrentValue.Month is less or equal than the value in thisRow.Month… which returns a filtered list of rows.
From the filtered list of rows, I can then dereference (access) their respective value in the field Usage transforming the list of rows in a list of numbers.
Sum() the values in the list of numbers .
I hope this helps !
Don’t hesitate if this is not what you wanted to accomplish ( ) … or if you have questions
PS, while I have you, is it possible for display multiple types of chart in one? I.e. I’d like the Usage to show as a bar, but for the Allowance to be a line.
Coda is pretty smart and interpret a lot of things all by itself but Copy/Pasting can, sometimes, lead to unfortunate errors .
If you just deleted the very first Month in the Filter() formula, Coda would have normally suggested you the “right” one (i.e.: the one where CurrentValue.Month is implied )
And you can always click on a value you use in a formula to get more info about it in the formula editor …
(See the highlighted Month in the screenshot below)
It is sadly not natively feasible as Coda doesn’t support combined type of charts at the moment .
Maybe there’s a pack in the Gallery that could do it , I don’t know (sorry )…
Another possibility, a bit complex, would be to look at SVGs … or embed such a chart from GSheets (for example)