+ Reply to Thread
Results 1 to 9 of 9

Calculated field using the Grand Total and Values fields of Pivot chart

  1. #1
    Registered User
    Join Date
    01-25-2018
    Location
    Michigan
    MS-Off Ver
    Microsoft 365 MSO (Version 2308 Build 16.0.16731.20496)
    Posts
    30

    Calculated field using the Grand Total and Values fields of Pivot chart

    I want to do a calculated field using the Grand Total and Values Count field of Pivot chart

    How do I put the manually created formula in Column E of Pivot into the Pivot chart, or Data sheet so i can add it to Pivot chart?

    I searched threads and other sites and all I found per answers.microsoft.com: You will not be able to do that with a calculated field formula. Either perform the calculation in another column of your base data or outside the Pivot Table.

    Pivot-CalcSummaryFields.png
    Attached Files Attached Files
    Last edited by krissysteen; 01-30-2018 at 01:22 PM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Calculated field using the Grand Total and Values fields of Pivot chart

    In this case, you can duplicate the number but display it as percent of row total. It's more information than you need, however.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    01-25-2018
    Location
    Michigan
    MS-Off Ver
    Microsoft 365 MSO (Version 2308 Build 16.0.16731.20496)
    Posts
    30

    Re: Calculated field using the Grand Total and Values fields of Pivot chart

    Thanks! I see it does give correct results, but yeah.... the extra column would make the report messy to send to my customer. Now if only there was a way to only display isDefault=N and the %, without having to Hide columns on the report.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Calculated field using the Grand Total and Values fields of Pivot chart

    Hi,

    A few quick questions if I may
    - Do you have Power Pivot?
    - Can you add a couple of columns to the source data?
    - Do you need the subtotals?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Calculated field using the Grand Total and Values fields of Pivot chart

    Pivot tables are powerful tools, but the do have limitations.

    This can't be done with just a native pivot table as far as I know. There may be some tweaking that can be done with the source data using formulas in a helper column that will give you a column header that can be used in the calculation, but you mentioned that you don't want to do this.

    Another method would be to use VBA to generate the formulas outside the pivot table and again, that's off the table.

    VBA could be used to extract just the columns you want, which would look nice, but it would be a static report.

  6. #6
    Registered User
    Join Date
    01-25-2018
    Location
    Michigan
    MS-Off Ver
    Microsoft 365 MSO (Version 2308 Build 16.0.16731.20496)
    Posts
    30

    Re: Calculated field using the Grand Total and Values fields of Pivot chart

    I don't have Power Pivot. Is that an Excel add on? I can add columns to the source data. And actually looking at my original document, the subtotals are not needed. Just the %.

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Calculated field using the Grand Total and Values fields of Pivot chart

    Power Pivot is an Excel add-on. As far as I am aware, for Excel 2013 you will either have it already available, or not be able to use it- it requires a Pro Plus or Professional Plus version of Office.

    If you don't need the subtotals for ABC, DEF etc, you can do it with a simple calculated item in the pivot table. See attached.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-25-2018
    Location
    Michigan
    MS-Off Ver
    Microsoft 365 MSO (Version 2308 Build 16.0.16731.20496)
    Posts
    30

    Re: Calculated field using the Grand Total and Values fields of Pivot chart

    Thanks Xlnitwit! Your solution is beautiful!

    It took me a few to apply it to my actual document. I didn't realize I couldn't have another Pivot in the workbook. Every time i tried to select Calculate Item I kept getting the error: If one or more fields in the PivotTable have calculated items, no fields can be used in the data area two or more times, or in the data area and another area at the same time. If you are trying to add a field, remove the calculated items and add the field again. If you are trying to add a calculated item, change the PivotTable report so that no field is used more than once and then add the calculated item.

    Pivot-Solution.png
    Last edited by krissysteen; 01-31-2018 at 02:05 PM.

  9. #9
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Calculated field using the Grand Total and Values fields of Pivot chart

    You can have other pivot tables in the workbook, although there are limitations with calculated items as the message says. If need be, you can always use a separate cache for the other pivot tables so that the calculated item does not apply to them.

+ 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] Calculated field for Grand Total
    By jomili in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-28-2017, 10:46 AM
  2. [SOLVED] A pivot table field calculated using other field values as fields?
    By chrisf78 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 05-07-2015, 03:08 AM
  3. Pivot Table Calculated Item Field Grand Total Not using Formula
    By gav0101 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-29-2014, 11:46 AM
  4. Replies: 0
    Last Post: 10-24-2013, 10:59 AM
  5. [SOLVED] Missing Grand Total for a Calculated Field in a Pivot Table
    By Robert Hamilton in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-07-2006, 02:20 PM
  6. Replies: 3
    Last Post: 01-26-2006, 01:55 PM
  7. [SOLVED] Pivot Table Calculated Field (Grand total question)
    By Linda in forum Excel General
    Replies: 5
    Last Post: 08-03-2005, 06:05 PM

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