30

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.

Dave
  • 25,297
  • 10
  • 57
  • 69
Chris Curvey
  • 1,347
  • 2
  • 13
  • 18

2 Answers2

32

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
  • 1,347
  • 2
  • 13
  • 18
15

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.

Nemo
  • 1,134
  • 3
  • 12
  • 31
W_Whalley
  • 3,422
  • 1
  • 18
  • 17