Creating a "running total" column

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

SaaS

What do you need help with?

I have a table where I track daily progress on various cross stitching projects. It has the following columns:

  • Date
  • Project (linked record)
  • Total stitches in project (lookup)
  • number of Stitches completed to date (directly entered)
  • Percent completed to date (formula)

I would like to add two more columns:

  • number of stitches added in a single day (directly entered)
  • Total stitches completed to date (formula, to replace the directly entered value in the “% complete” formula)

I’m struggling with how to write the formula for the new column. It should be kind of a running total that takes the date into account and does not include any values from later dates:

(Most recent directly entered total # of stitches) + (sum of all daily stitches since then) = computed total # of completed stitches

What’s the best way to do this? Do I need to involve another table?

Hi @looseleaf, formulas in Baserow can’t look at other rows, which means you can’t sum previous values based on date. You’ll need to implement workflow automations to build this logic. @frederikdc, please correct me if I’ve missed anything.

Maybe the summary fields at the bottom of each table can help you?

You can create a view with a filter where you enter a certain date and only show the records from that day. The summary fields will only take the records from that view into account. You can use a similar approach to see all records upon a certain date.