Pivot Table - Calculated Field Question

sea_captain

New Member
Joined
Jan 10, 2017
Messages
11
Can you help calculating a field in a pivot table.

Example - I have 3 columns of Data.
Column A ("Month") i.e. Jan, Feb, Mar etc.
Column B ("Task") i.e. Task A, Task B, Task C etc.
Column C ("Amount") i.e. 1, 2, 3 etc.

In the Pivot Table Fields -
I drag "Month" into the "Columns" box.
I drag "Amount" into the "Values" box.
Last i drag "Task" into the "Rows" box.

I am looking to subtract 2 months (ie. = Feb - Jan) in a calculated field (not outside of the pivot table).

I tried unsuccessfully. I'm looking to eventually sort the data (Z/A) by the new calculated field. Any ideas?
Thanks.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You cannot do it that way.
You can subtract/add/multiple different fields but not different criteria of a field, in a regular Pivot Table as you describe.

You Can use a different calculation in a vertical arrangement where you use the Value Field Settings and select the "Show Values As" a Diference From..., a base field of the date field and Base item being previous.
 
Upvote 0
With an additional Measure you could.
A measure is created in the Data Model. This would be using Power Pivot.
PowerPivot is both easy and hard and sometimes a little extra work to think more "database" than excel/sheet base.

Microsoft's introduction to PowerPivot
 
Upvote 0

Forum statistics

Threads
1,215,450
Messages
6,124,912
Members
449,195
Latest member
Stevenciu

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