I have a LibreOffice Calc spreadsheet which has this structure

          5         0          10
         15         2          12
          3         2         105
          2         6          10
          2         0          20
          5         6          20

Let's say there are R data rows in this sheet, one per day. I want to aggregate this to get numbers per N days. This derived sheet will have R/N rows.

To get per-week totals, we have N=7. For the sake of illustration, let's pretend that we are doing this for N=2, then the new sheet looks like this

        20          2          20
         5          8         115
         7          6          40

How do I do this?

  • 1
    A quick and dirty approach is to add a helper column. Populate that with "group" numbers. You could generate that with a simple formula or just count and do it manually. Then use a pivot table to aggregate on the helper column. – fixer1234 Jan 30 '18 at 21:38

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.