How do I do a pivot table in Numbers?
I can't find any equivalent of the Excel Pivot Table or Open Office Data Table features. I'd like to sum up my data grouped by values in various columns.
For example, if I have
A B C
red left 2
red left 3
green left 4
green right 4
I want to be able to get
red green all
left 5 4 9
right 0 4 4
all 5 8 13
Assuming the tables are named Original and Pivot, the cells in Pivot are filled using this formula:
=SUMIFS(Original::$C, Original::$A, "="& $A2, Original::$B, "="& B$1)
i.e. sum values in Original::$C
if
- corresponding value in
Original::$A
= value in first column of Pivot - corresponding value in
Original::$B
= value in first row of Pivot
The 'all' values are just simple sums of those rows or columns.