+ Reply to Thread
Results 1 to 2 of 2

Having Trouble Getting a Correct Percentage in Pivot Chart

  1. #1
    Registered User
    Join Date
    05-14-2020
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    1

    Having Trouble Getting a Correct Percentage in Pivot Chart

    Hi everyone,

    I'm new to the forum but have just started self-teaching on Excel Pivot, its an exciting new world, but also running into some frustrations around what I feel should be a simple thing.

    Context:
    1. My source data is made up of student, campus, demographic columns and then a number of columns for "Risk Factors" (Family Violence etc.) these are filled with 1s and 0s by our School Wellbeing Team
    2. I am trying to build a dashboard to allow our Wellbeing Director to easily visualise different patterns in this data (look at prevalence of different risk factors in our cohort, slice based on gender/cultural background/campus/year.

    What I need:
    1. I need the risk factors to present as a % of total risk factors rather than absolute numbers, this will make our data more accurate because, in absolute numbers female students may have far higher instances of a particular risk factor but this may just be because we have more female students, so it needs to be a relative number rather than an absolute one. I hope that makes sense.

    Problem
    1. I have set up the pivot chart with risk factors as values, Year as column and Campus/Gender/ATSI (Aboriginal) as filters and then made values "sum" rather than "count" so it doesn't include 0s in the total number.
    2020-05-15 09_09_44-RD Tidy Wellbeing Risk Factor Data (Autosaved).xlsx - Excel.png

    2. I am trying to turn the numbers into % of the column total but when I click percentage of Column total in Value Settings it doesn't seem to refer to the column on the Pivot table
    Percentage of Column Total.png

    3. I get a different result when I try % of Parent Column
    Percentage of Parent Column Total.png

    4. I get another result when I try % of "Total"
    Percentage of Total.png

    The result I should get for the top Risk Factor (Family Dysfunction) against total risk factors for that year (Highlighted in yellow at the bottom) is 17.9%

    I have attached a sample workbook set up like my main workbook (the data is deidentified for obvious reasons).

    I'd be greatly appreciative of any clarification or help, the suggestions you make and assistance you provide will have a meaningful impact on creating a data driven school environment to target the most overepresented risk factors among our students to try and improve things for them. I'm not familiar with macros or vbas or anything, so hopefully it can be solved within vanilla pivot which I'm still early in my journey with.
    Attached Files Attached Files

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Having Trouble Getting a Correct Percentage in Pivot Chart

    your risk factors are stored as separate measures (i.e. discrete columns), and therefore there is no intrinsic relationship to the "total".

    2 options

    1. create a Calculated Field for each of your measures - e.g. AD/# Risk Factors, and use these in place of your table measures
    2. use Power Query to unpivot your source table (in memory) and use that as source for your Pivot

    for both maintenance and flexibility (in the Pivot) I would advise #2 -- per attached.

    Please Login or Register  to view this content.
    your Pivot will simply use "Attribute" (can be renamed) as row label, and Value (as % of Column) as Data field
    Attached Files Attached Files
    Last edited by XLent; 05-15-2020 at 05:56 AM.

+ 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. [SOLVED] Help with On-time Percentage (Pivot table and Chart)
    By Physicsboy in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 07-07-2015, 07:24 AM
  2. Trouble using the secondary axis with a pivot chart
    By msantucci in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-13-2014, 09:42 AM
  3. Pivot Chart not displaying correct data
    By alexander.small in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-09-2014, 08:37 AM
  4. [SOLVED] Trouble genrating correct pivot table data from a survey
    By Chrispelletier in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-03-2014, 07:38 PM
  5. VBA - Chart Help getting correct series from Pivot table
    By Jeep56 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2013, 03:25 AM
  6. [SOLVED] Chart not displaying correct percentage
    By avidcat in forum Excel General
    Replies: 2
    Last Post: 04-22-2012, 12:24 PM
  7. Trouble with a pivot chart saved as a web page
    By lfarnswo in forum Excel General
    Replies: 1
    Last Post: 07-09-2009, 08:55 AM

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