Pivot Table Calculated Total

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Pivot Table Calculated Total

Post by jstevens »

I have a pivot table that returns yearly totals of Revenue + Expenses (1000 + 500 = 1500). Revenue and Expenses are both positive which is returning the incorrect yearly total. In this example the yearly total should be 1000 - 500 = 500.

I'm not sure how to change the calculation to return the correct value.

Your thoughts are appreciated.
Regards,
John

User avatar
HansV
Administrator
Posts: 78475
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pivot Table Calculated Total

Post by HansV »

Could you attach a small sample workbook?
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Pivot Table Calculated Total

Post by jstevens »

Hans,

Here is a sample workbook.
Pivot.xlsx
You do not have the required permissions to view the files attached to this post.
Last edited by jstevens on 08 Aug 2020, 15:01, edited 1 time in total.
Regards,
John

User avatar
HansV
Administrator
Posts: 78475
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pivot Table Calculated Total

Post by HansV »

I would convert all expense amounts to be negative (just like you need to do in Excel's financial functions).

S3450.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Pivot Table Calculated Total

Post by jstevens »

Hans,

I tried your suggestion prior to posting. That corrects the math in the pivot table however the chart changes: expenses shown as negative instead of positive. Is there a way to multiply expenses in the chart by negative 1?
EL_94.PNG
You do not have the required permissions to view the files attached to this post.
Regards,
John

User avatar
HansV
Administrator
Posts: 78475
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pivot Table Calculated Total

Post by HansV »

That's the way financial stuff works: income is positive, spending is negative...

If you don't like this, you'd have to create your own table using formulas instead of a pivot table.
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Pivot Table Calculated Total

Post by jstevens »

Thanks Hans!
Regards,
John

jstevens
GoldLounger
Posts: 2628
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Pivot Table Calculated Total

Post by jstevens »

Hans,

I found a solution utilizing Power Pivot which has been around since Excel 2010. I modified my sample file and put the solution on the sheet named "Data Tables".
Pivot.xlsx

:whisper: Looks like jstevens learned something new today
You do not have the required permissions to view the files attached to this post.
Regards,
John

User avatar
HansV
Administrator
Posts: 78475
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pivot Table Calculated Total

Post by HansV »

Great! :thumbup:
Best wishes,
Hans