Hi ya,
I have been searching all through the forum but cannot get my head around Pivot Table calculated field, will be very appreciate of any help. I have raw data as following. I buy stock from different suppliers. Every item has a code. If I buy same stock from different suppliers, my code remains same. My category determines whether I am buying or selling stock.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Suppliers or client[/TD]
[TD]Code
[/TD]
[TD]Category[/TD]
[TD]Item[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]Supplier 1[/TD]
[TD]1001[/TD]
[TD]Purchase[/TD]
[TD]Sofa[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]Supplier 1[/TD]
[TD]1002[/TD]
[TD]Purchase[/TD]
[TD]Bed[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]1001[/TD]
[TD]Sell[/TD]
[TD]Sofa[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Supplier 2[/TD]
[TD]1001[/TD]
[TD]Purchase[/TD]
[TD]Sofa[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]1001[/TD]
[TD]Sell[/TD]
[TD]Sofa[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD]1002[/TD]
[TD]Sell[/TD]
[TD]Bed[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
I need Pivot table summary as following where it gives me the balance of my remaining stock.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Code
[/TD]
[TD]Sum of Purchase Quantity[/TD]
[TD]Stock Remaining[/TD]
[/TR]
[TR]
[TD]Sofa[/TD]
[TD]1001[/TD]
[TD]20[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]Bed[/TD]
[TD]1002[/TD]
[TD]30[/TD]
[TD]29[/TD]
[/TR]
</tbody>[/TABLE]
Thanks a lot.
Naim
I have been searching all through the forum but cannot get my head around Pivot Table calculated field, will be very appreciate of any help. I have raw data as following. I buy stock from different suppliers. Every item has a code. If I buy same stock from different suppliers, my code remains same. My category determines whether I am buying or selling stock.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Suppliers or client[/TD]
[TD]Code
[/TD]
[TD]Category[/TD]
[TD]Item[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]Supplier 1[/TD]
[TD]1001[/TD]
[TD]Purchase[/TD]
[TD]Sofa[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]Supplier 1[/TD]
[TD]1002[/TD]
[TD]Purchase[/TD]
[TD]Bed[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]1001[/TD]
[TD]Sell[/TD]
[TD]Sofa[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Supplier 2[/TD]
[TD]1001[/TD]
[TD]Purchase[/TD]
[TD]Sofa[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]1001[/TD]
[TD]Sell[/TD]
[TD]Sofa[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD]1002[/TD]
[TD]Sell[/TD]
[TD]Bed[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
I need Pivot table summary as following where it gives me the balance of my remaining stock.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Code
[/TD]
[TD]Sum of Purchase Quantity[/TD]
[TD]Stock Remaining[/TD]
[/TR]
[TR]
[TD]Sofa[/TD]
[TD]1001[/TD]
[TD]20[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]Bed[/TD]
[TD]1002[/TD]
[TD]30[/TD]
[TD]29[/TD]
[/TR]
</tbody>[/TABLE]
Thanks a lot.
Naim