Summarize data by week number?

Hi! I have tons of data identified by unique date. I’d like to summarize it by week number so make it easier to read.

So that instead of this:

I’d like:

Week 1 (Sum of dates 1->7)
Week 2 (Sum of dates 8->14)

I have tried so many things, but they don’t work quite right.

My data is here: COVID-19 in Scandinavia

Hi @Jacob_Botter
and welcome to Coda Community!

You have 3 options, depending on how you need to use data.

  1. If its only for chart purposes, you add a Week column (with the formula Date.WeekNumber()) and then you plot the chart based on week and with aggregated values
  2. If you need it on a single table (i.e. for each date row, you need the value of that week too), it’s a bit redundant, but on top of the Week column, you add aggregated data by country - e.g. Denmark Weekly - with thisTable.Filter(Week=thisRow.Week).Denmark.Sum()
  3. You create a new weekly data table that - with an automation - adds or recomputed the aggregated value for that week.

I hope this helps: let me know otherwise.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.