Libreoffice - Calc - Get the sum for each group of data

By xngo on June 11, 2019

In Libreoffice spreadsheet, you can get the total of each group. For example, if you want the total amount of debit for each day. The following data

Date        Debit ($)
2018-01      17.95
2018-01     398.54
2018-01      78.00
2018-02     115.00
2018-02      48.00
2018-02      50.71
2018-02      73.58
2018-02     212.80
2018-03     168.20
2018-03     117.09
2018-03     213.07
2018-03     356.90

will become

Date         Sum - Debit ($)
2018-01             494.49
2018-02             500.09
2018-03             855.26
Total Result      1,849.84

This can be done using Data > Pivot table. Here is a video showing how to do it.

How do I create a sum for each group of data in Libre Office Calc?

Note:

  • All columns that define your group/category should be in Row fields section.
  • Put columns that you want to process in Data fields section. Double-click on each field will allow you to choose different functions: Sum, Count, Average, Max, Min, etc.

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.