Excel pivot table calculated field using Grand total

I want to receive product of A and B in Column C

  • I’m trying to create a calculated field with an “If” statement but it’s not behaving as I’d expect. I have a pivot table with “Employee Type” that can be “Contractor” or “Permanent” and then various cost rates per employee. I need to do one calculation for Contractor and a different one for Employees. I’m using the following:

    =IF(‘Employee Type'”Contractor”,(WeeklyCappedHours/hours)*’$ Cost’, hours)

    However no matter what I do the formula doesn’t calculate differently for Permanent people v. Contractors.

    What am I doing wrong?

  • I’m hoping someone can help with a calculated field of a Pivot table: I want to take say, column B in the Pivot Table and divide it by the TOTAL of column A. Can anyone help?

  • I have a pivot table that has sales by year for 8 years. I only want to show the difference between sales for the last two years (2018 vs 2017). I know how to use Show Values As > Difference From – but that gives me the difference for all year pairs. Is there a way to have it for only the last two years of the table?

  • I have a pivot table that has sales by year for 8 years. I only want to show the difference between sales for the last two years (2018 vs 2017). I know how to use Show Values As > Difference From – but that gives me the difference for all year pairs. Is there a way to have it for only the last two years of the table?

  • formula in 1st example should be profit/sales & not other way.

  • Comments are closed.

    Excel pivot table calculated field using Grand total

    Follow the step-by-step tutorial on how to show you an Excel Formula to Calculate Percentage of Grand Total and download this Excel workbook to practice along:

    STEP 1: Select any cell in the data table.

    STEP 2: Insert a new Pivot table by clicking on your data and going to Insert > Pivot Table.

    Excel pivot table calculated field using Grand total

    STEP 3: Insert a new Pivot In the Create PivotTable dialog box, select the table range and New Worksheet, and then click OK.

    Excel pivot table calculated field using Grand total

    STEP 4: In the ROWS section put in the Sales Month field, in the COLUMNS put in the Financial Year field and in the VALUES area you need to put in the Sales field twice, I explain why below:

    Excel pivot table calculated field using Grand total

    The Pivot Table will look like this:

    Excel pivot table calculated field using Grand total

    STEP 5: Click the second Sales field’s (Sum of SALES2) drop down and choose Value Field Settings

    Excel pivot table calculated field using Grand total

    STEP 6: Select the Show Values As tab and from the drop-down choose % of Grand Total. 

    Also, change the Custom Name into Percent of Grand Total to make it more presentable. Click OK.

    Excel pivot table calculated field using Grand total

    An Excel formula to calculate percentage of grand total will be added!

    STEP 7: Notice that the Percent of Grand Total data is in a decimal format and it is hard to read it:

    Excel pivot table calculated field using Grand total

    To format the Percent of Grand Total column, click the second Sales field’s (Percent of Grand Total) drop down and choose Value Field Settings. 

    The goal here is for us to transform numbers from a decimal format (i.e. 0.23), into a percentage format that is more readable (i.e. 23%).

    Excel pivot table calculated field using Grand total

    STEP 8: Click the Number Format button.

    Excel pivot table calculated field using Grand total

    STEP 9: Inside the Format Cells dialog box, make your formatting changes within here and press OK twice.

    In this example, we used the Percentage category to make our Percent of Grand Total numbers become more readable.

    Excel pivot table calculated field using Grand total

    You now have your Pivot Table, showing the Excel Pivot Table percentage of totalfor the sales data of years 2012, 2013, and 2014.

    All of the sales numbers are now represented as a Percentage of the Grand Total of $32,064,332.00, which you can see on the lower right corner is represented as 100% in totality:

    Excel pivot table calculated field using Grand total

    This completes our tutorial on the Excel formula to calculate percentage of grand total!

    You can even use this option to show the sales by category as a percentage of the grand total.