Wednesday 28 August 2019

Excel pivot table, difference between fields in the same column

I have table that has the same account names but for different years (sample below). I want to create a pivot item field that calculates the difference between the years for the same account name



Account Name Year Amount
Account 1 2014 15000
Account 1 2015 20000
Account 2 2014 30000
Account 2 2015 60000

So for Account 1 the difference is 5K and coount 2 the difference is 30K. How do i get the difference for the two fields when the amounts belong to the same column and can only be differentiated by year?


Sum of Amount Column Labels


 
Row Labels 2014 2015 Grand Total
Account 1 15000 20000 35000
Account 2 30000 60000 90000
Grand Total 45000 80000 125000



The output I would like to show is below:

I need the change to be part of the pivot table because I want to then get the top 40 base on change column.


Sum of Amount Column Labels



Account. 2014 2015 Change
Account 2 30000 60000 30000
Account 1 15000 20000 5000
Grand Total 45000 80000 35000


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...