Using a subtotal for calculation

davey4444

Board Regular
Joined
Nov 16, 2010
Messages
97
Hi there. I've a table below which shows the cost of production and I want to show that cost per unit for each of the separate items in each plant. Obviously if I try to do this in a normal calculated field in an Excel Pivot I will get a DIV/0 error where there are no units sold.
What my desired outcome is that I can have a column which would show for "Period -1" and "Plant A" the cost of a journey of 5.00 (100/20), wait would be 2.5 (50/20) as would trans. On "Period -2" for "Plant B", the sales would be 1.0 (100/100), wait would be 0.5 (50/100) etc.

I will have various items which will have units against them and I think that PowerPivot can give me the solution to this but I'm unsure as to how. I may also want to remove the "Period" column at some point and in which case I'd want my measure to then sum the Units of the items by Plant.

PeriodPlantitemUnitsCost
Period -1Plant Ajourney
20​
100​
Period -1Plant Await
0​
50​
Period -1Plant Atrans
0​
50​
Period -1Plant Bjourney
50​
100​
Period -1Plant Bwait
0​
50​
Period -1Plant Bwait
0​
50​
Period -2Plant Bsales
100​
100​
Period -2Plant Bwait
0​
50​
Period -2Plant Btrans
0​
50​
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,223,243
Messages
6,170,964
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top