Pivot Table Calculations

xxthegiantxx

New Member
Joined
Jan 5, 2017
Messages
24
ABCDEFGHI
MaterialApr VolumePriceApril revenueMay VolumePriceMay RevenueVolume TotalTotal Revenue
1X101.0010.0051.00
5.001515.00
2Y12.002.0022.004.0036.00

<tbody>
</tbody>

I am using a pivot table in which total monthly volumes are calculated. I am trying to get the pivot table to automatically calculate the total revenues (green letters) by multiplying the price times monthly volume. The price does not change. Therefore, i don't think i can have a row in the table with the price. I tried this using a vlookup formula to add price when a material is selected but the pivot table calculates the sum of these or avg. etc.
How do i
1. add a row in my pivot chart for the price
2. add a row that multiplies price time volume monthly to get me a grand total
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
You can add a calculated field that performs that multiplication.
Caution, that may not provide a valid Column calculation, but will work for the row calculation.
 
Upvote 0
Spiller, can you give more detail on how to do that? From what i know, calculated fields only work if the item is a column in the pivot table. Price does not change. If i add it to the table as a column that uses vlookup to pull the price when a material in the column is detected, the pivot table will calculate the price as a sum, average, etc. This does not allow me to do an accurate calculation. In other words, using the table above, it should calculate B x C= D. Instead, C becomes a sum of all the data series with Material 'X'. Price does not remain unchanged.
 
Last edited:
Upvote 0
Spiller, can you give more detail on how to do that? From what i know, calculated fields only work if the item is a column in the pivot table. Price does not change. If i add it to the table as a column that uses vlookup to pull the price when a material in the column is detected, the pivot table will calculate the price as a sum, average, etc. This does not allow me to do an accurate calculation. In other words, using the table above, it should calculate B x C= D. Instead, C becomes a sum of all the data series with Material 'X'. Price does not remain unchanged.

It is not a concern for each row. At the Grand Total and Subtotal Rows it would be. There are DAX methods to get around those issues but I am only aware of and not knowledgeable in DAX.

The other route is to provide the calculation in the source data. For small data sets that's easy, but a bad habit when getting into large (ie millions of rows) data sets. But those data sets will force PowerPivot and DAX solutions anyway. (see Rob Collie, PowerPivotPro.com and Ken Puls https://www.powerquery.training/about-us/)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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