Pivot table from DataModel > hpw to add a formula?

babettedv

New Member
Joined
Jan 27, 2021
Messages
32
Office Version
  1. 2016
Platform
  1. Windows
Hi there,

I hope that someone can help me with the following:
I have a pivot table based on a DataModel.
I wuld like to show the Row subtotals as Actuals - Budget.
Now the row subtotal sums the two.
e.g. CARD009 total = 199 (2903 - 2704)

Is that possible?

Thanks a lot

1740991410283.png
 
I'd suggest you create a measure for Actuals, another for Budget and then one for the difference.
 
Upvote 0
Right-click the table name in the Field List, and choose Add measure...
Enter a name for the measure and then the relevant formula. Here the formula will be something like:

Excel Formula:
=CALCULATE(SUM([value field name]),[row field name]="Actuals")

for example. Repeat for the Budget. Then your difference field formula will just be:

Excel Formula:
 =[Budget measure name]-[Actuals measure name]

substituting the relevant field/measure names in to all the formulas.
 
Upvote 0

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