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

23

2

I have a simple spreadsheet like this:

Invoice_Number     Invoice_Date      Invoice_Amt
1000               1/1/12            1
1001               1/1/12            2
1002               1/2/12            3
1003               1/3/12            4

How can I get LibreOffice Calc to create a sum of the amounts for each date? I have a feeling it has do with outlining and grouping, but I can't get the incantation right.

Chris Curvey

Posted 2013-03-04T15:29:03.430

Reputation: 1 105

Answers

26

I was on the wrong path. What I wanted was Data->Subtotals. Then you pick the column to use as a control-break (in my case, Invoice_Date), the column that you want to subtotal on (in my case, Invoice_Amt), and what you want to calculate. (I wanted SUM(), but you could do AVG, MIN, MAX, etc)

Chris Curvey

Posted 2013-03-04T15:29:03.430

Reputation: 1 105

12

One way would be to use a Pivot Table. Select the data table including the headings then choose Data/Pivot Table/Create/Current Selection. In the pivot table dialog click and drag the Invoice_date to the Row Fields section and the Invoice_amt to the Data Fields section. The default is to Sum the Invoice_amt. By default the pivot table will be put on a new sheet, but you can change that (and some other options) using the More button.

W_Whalley

Posted 2013-03-04T15:29:03.430

Reputation: 3 212