Hi guys!
I like Excel a lot and have been using it for years, however always got through without pivot tables and relied just on formulas. Should still be the case with the following quest (SUMIF?), however I feel I have to try out a pivot table sooner or later.
I have a somewhat easy objective as I need to do function similar to SUM and GROUP BY in SQL syntax. I'll give an example below in a simplified way. I have 2 tables on different worksheets, but I suppose that doesn't matter?
I was able to set up pivot table for 1 table (i.e INFLOW) fine which summarized quantities for all items correctly. I'm struggling to add data from the other table though (i.e. OUTFLOW), which should obviously have negative values.
Is it possible to put them both together in a single pivot table and summarize them over 2 data sets? And if so, do I need to enter values in OUTFLOW table as negative (i.e. add minus sign to the values)? In the spirit of getting to know pivot tables better, I would not just create 2 separate pivot tables and compare values with INDEX&MATCH formulas + add another formula to SUM them - unless pivot table can do that for me.
Thanks a lot!
INFLOW
Item Quantity [TABLE="width: 200"]
<tbody>[TR]
[TD]Apple
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]Apple
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]Cherry
[/TD]
[TD]8
[/TD]
[/TR]
[TR]
[TD]Orange
[/TD]
[TD]5
[/TD]
[/TR]
</tbody>[/TABLE]
OUTFLOW
Item Quantity [TABLE="width: 200"]
<tbody>[TR]
[TD]Cherry
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]Orange
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]Apple
[/TD]
[TD]8
[/TD]
[/TR]
[TR]
[TD]Orange
[/TD]
[TD]5
[/TD]
[/TR]
</tbody>[/TABLE]
I like Excel a lot and have been using it for years, however always got through without pivot tables and relied just on formulas. Should still be the case with the following quest (SUMIF?), however I feel I have to try out a pivot table sooner or later.
I have a somewhat easy objective as I need to do function similar to SUM and GROUP BY in SQL syntax. I'll give an example below in a simplified way. I have 2 tables on different worksheets, but I suppose that doesn't matter?
I was able to set up pivot table for 1 table (i.e INFLOW) fine which summarized quantities for all items correctly. I'm struggling to add data from the other table though (i.e. OUTFLOW), which should obviously have negative values.
Is it possible to put them both together in a single pivot table and summarize them over 2 data sets? And if so, do I need to enter values in OUTFLOW table as negative (i.e. add minus sign to the values)? In the spirit of getting to know pivot tables better, I would not just create 2 separate pivot tables and compare values with INDEX&MATCH formulas + add another formula to SUM them - unless pivot table can do that for me.
Thanks a lot!
INFLOW
Item Quantity [TABLE="width: 200"]
<tbody>[TR]
[TD]Apple
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]Apple
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]Cherry
[/TD]
[TD]8
[/TD]
[/TR]
[TR]
[TD]Orange
[/TD]
[TD]5
[/TD]
[/TR]
</tbody>[/TABLE]
OUTFLOW
Item Quantity [TABLE="width: 200"]
<tbody>[TR]
[TD]Cherry
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]Orange
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]Apple
[/TD]
[TD]8
[/TD]
[/TR]
[TR]
[TD]Orange
[/TD]
[TD]5
[/TD]
[/TR]
</tbody>[/TABLE]