+ Reply to Thread
Results 1 to 6 of 6

Percentage change in Pivot

  1. #1
    Registered User
    Join Date
    03-27-2012
    Location
    Tampa, FL
    MS-Off Ver
    Excel for M365
    Posts
    53

    Percentage change in Pivot

    Hi there - I am trying to show year over year percentage change within a Pivot. I have this as a field in my report, but obviously summing those is not accurate either. I have tried where you double select a metric (in this place the year over year difference) and then make that second selection a calculation, but I'm not getting the result I need. I actually went item by item and tried them all. My Pivot is showing location, 2016 amount, 2015 amount, the year over year difference and then I'd like the last column to show the percentage incr/decr, but I must have something wrong with the settings. I've attached an example if someone could help, I'd appreciate it.
    Attached Files Attached Files
    Last edited by Jess0121; 01-22-2016 at 11:00 AM. Reason: marked solved

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Percentage change in Pivot

    This solution just takes the raw data from 2015 and 2016 as pivot table fields. It then incorporates the following calculated field formula for the YoY Diff field:
    Please Login or Register  to view this content.
    To get the % Chg the formula is:
    Please Login or Register  to view this content.
    Here is a copy of your file with the pivot table:
    Pivot Table Calculated Fields.xlsx
    Check and make sure that the numbers are as you expect, let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    03-27-2012
    Location
    Tampa, FL
    MS-Off Ver
    Excel for M365
    Posts
    53

    Re: Percentage change in Pivot

    Thank you. I will admit this is the first time I've ever created a calculated field. I see the data range changed on the PT to just the 2015/2016 data. How did you create the fields for difference and % change? I see them there as fields even though they're not highlighted as part of the data on the spreadsheet. Is there somewhere I can "create a field" and manually type/create the formula? The math is super simple, I just didn't want to hard code the PivotTable to create it since I have other filters on it so this concept of adding mathematical calcs to a PT is very neat. Thank you in advance for the further assistance!

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Percentage change in Pivot

    When you select one of the cells in the PT you will see a new tab called Pivot Table Tools with a sub tab named options at the top of the sheet. Select options and find the Fields, Items & Sets icon. The first choice under that selection is for Calculated Fields. You can do mathematical operations with any of the existing fields. I think that I understand what you are saying about hard coding. Lets say that you may want to change the second year from 2015 to 2014 and you want the YoY Diff and % Chg fields to adapt accordingly. I don't think that the calculated field will automatically change, although I could be wrong about that. What you may have to do in that situation is to put a formula like I3-J3 in K3 and K3/J3 in L3. If you want to upload a more comprehensive file and some possible PT queries, someone may be able to help in setting it up the way you want.

  5. #5
    Registered User
    Join Date
    03-27-2012
    Location
    Tampa, FL
    MS-Off Ver
    Excel for M365
    Posts
    53

    Re: Percentage change in Pivot

    Thank you so much! I've made sure to add some reputation.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Percentage change in Pivot

    You're welcome and thank you for the feedback and added reputation. If you have not already, please take a moment to mark the thread 'Solved' using the thread tools link above your first post. Hope that you have a good day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Percentage Change and Pivot Tables
    By hokkaido19 in forum Excel General
    Replies: 2
    Last Post: 01-17-2015, 12:11 AM
  2. How to change my pivot values to percentage ...
    By niloufar in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 06-16-2014, 01:08 AM
  3. [SOLVED] Running percentage change in a pivot table?
    By Jay T in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-12-2013, 12:01 AM
  4. How to calculate percentage change between values in a pivot table
    By no.18shirt in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-03-2013, 01:48 PM
  5. Change percentage -> dynamically change price
    By dmb41 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-12-2013, 11:26 AM
  6. percentage change
    By Bugzy in forum Excel General
    Replies: 3
    Last Post: 12-12-2009, 06:37 PM
  7. [SOLVED] percentage:how do I calculate the percentage change
    By Knowledge001 in forum Excel General
    Replies: 3
    Last Post: 11-25-2005, 02:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1