How do i add percentages to a pivot table in google sheets?

Are you struggling with calculating a percentage in a pivot table? Pivot tables in Excel are excellent tools for analyzing data. They help you to aggregate, summarize, finding insights and presenting a large amount of data in just a few clicks, including calculating a percentage from given data.

You can create and modify pivot tables very quickly. You can create calculated fields in a pivot table that help expand your analysis with more data. Though it has some limitations, calculated fields are a great way to find new insights, such as percentages, from pivot tables.

In this example, you have the beverage sales data of eleven items for the 3rd quarter of the year.

How do i add percentages to a pivot table in google sheets?

Create and format your pivot table

To create the Pivot Table and apply conditional formatting, you need to perform the following steps:

  1. Click anywhere in the data.
  2. Go to Insert > Recommended PivotTables. Scroll down and select the one that says Sum of Sales by Items and Month.

    How do i add percentages to a pivot table in google sheets?

  3. Click OK.

How do i add percentages to a pivot table in google sheets?

You will have the pivot table with the Sales for the Items for each Month.

To calculate % of Sales for each month, you need to do the following:

How do i add percentages to a pivot table in google sheets?

  1. Click on pivot builder the entry Sum of Sales and select Value Field Settings.
  2. In the Value Field Settings window, on the Show Values As tab, choose % of Column Total.

    How do i add percentages to a pivot table in google sheets?

  3. Click OK.

This would show the sales for each item as the percentage of total monthly sales.

How do i add percentages to a pivot table in google sheets?

Create the calculated field in the pivot table

A calculated field is a column generated by the data in the pivot table. For this example, we will use the sales and profit data for the eleven items during the 4th quarter of the year.

How do i add percentages to a pivot table in google sheets?

From this, we have the pivot table Sum of Sales and Profits for the Items.

How do i add percentages to a pivot table in google sheets?

To add the profit margin for each item:

  1. Click on any cell in the Pivot Table.
  2. Go to (Pivot Table Tools) Analyze > Fields, Items, & Sets > Calculated Field.

    How do i add percentages to a pivot table in google sheets?

  3. In the Insert Calculated Field dialog box,
    • Assign a name in the Name field.
    • In the Formula field, insert the formula =Profit/Sales by clicking on the Insert Field button from the Fields box.

    How do i add percentages to a pivot table in google sheets?

  4. Click ADD and then OK.

How do i add percentages to a pivot table in google sheets?

Limitation of the calculated fields in the pivot table when calculating a percentage

Calculated fields in pivot table have some limitations. A calculated field is always performed against the SUM of the data. This limits you from using a lot of functions. Furthermore, you cannot use any functions that require cell references or defined names as an argument. This rules out functions like COUNT, AVERAGE, IF, AND, NOT, and OR.

In the following example, you will use the Clayton High School Track and Field club’s event record for the past six months. It includes the EventNames and Win records. You will calculate the count of wins as a percentage for the count of athletes based on the events.

How do i add percentages to a pivot table in google sheets?

From this, we have the pivot table Count of Name and Count of Win.

How do i add percentages to a pivot table in google sheets?

To find the count of wins as a percentage for the count of athletes based on events at first, you will try with a calculated field. Add a calculated field like the previous section named Win Percentage and having the formula =Win / Name.

How do i add percentages to a pivot table in google sheets?

As calculated field only performs calculations against the SUM of data, we get a #DIV/0 error.

How do i add percentages to a pivot table in google sheets?

To overcome this issue, you need to follow the next steps:

  1. Make sure you have Power Pivot enabled in File > Options > Add-Ins.
  2. Click COM Add-ins in the Manage box > Click Go.
  3. Check the box for Microsoft Office Power Pivot > click OK. Select the Power Pivot add-in for Excel if you have other versions of power pivot installed.

    How do i add percentages to a pivot table in google sheets?

From the Events_Record worksheet, go to Power Pivot > Manage.

You will use Data analysis expression (DAX) to create calculated fields in Power Pivot. DAX is used to add calculations. A measure is a formula that is created specifically for use in a pivot table that uses data in the Power Pivot. You will use the measure in the Values area of the pivot table.

  1. In the Power Pivot window, Click Home> View> Calculation Area.

    How do i add percentages to a pivot table in google sheets?

  2. Click on an empty cell in the Calculation Area.
  3. In the formula bar, at the top of the table, enter the formula,% of wins := DIVIDE(CALCULATE(COUNTA([Win]),FILTER(Table1,Table1[Win]="Y")),COUNTA([Name]),0)

    How do i add percentages to a pivot table in google sheets?

  4. Press Enter to accept the formula.

    How do i add percentages to a pivot table in google sheets?

  5. Click anywhere in the Power Pivot data. Go to Home > PivotTable.
  6. In the Create PivotTable dialogue box, check New Worksheet.
  7. In the resulting pivot table worksheet, expand Table1 in the PivotTable Fields Menu on the right. Drag Events to the Row field. NameWinand fx % of wins to the Values field.

    How do i add percentages to a pivot table in google sheets?

  8. Right-click anywhere in the % of wins column in the pivot table. Select Value Field Settings > Show Values As > Number Format > Percentage. Click OK twice.

    How do i add percentages to a pivot table in google sheets?

This will show the count of wins as a percentage for the count of athletes based on the events.

How do i add percentages to a pivot table in google sheets?

Pivot tables are a great way to summarize and aggregate data to model and present it. You can now visualize and report data in the blink of an eye. Dashboards and other features have made gaining insights very simple using pivot tables. Calculated fields in the pivot table is a great way to create formulas to add a sum of columns.

There are many powerful features of Pivot Tables, Power Pivot, and Data analysis expression (DAX) that could help you gain insights into your data. If you want to save hours of researching and frustration and get to the solution quickly, try our Excel Live Chat service! Our Excel experts are available 24/7 to answer any Excel question you have on the spot. The first question is free.

How do I add a percentage to a PivotTable sheet?

Right-click anywhere in the % of wins column in the pivot table. Select Value Field Settings > Show Values As > Number Format > Percentage. Click OK twice.

How do you automatically add percentages in Google Sheets?

Simply set the format of cells to percent and Google Sheets will do the rest..
Enter the below formula to D2: =C2/B2..
Copy it down your table..
Go to Format > Number > Percent in Google Sheets menu to apply the percentage view..

Can pivot tables show data as percentages?

And, when you want a PivotTable to help you see relationships within your data, you can show values in terms of percentage of totals and even percentage of subtotals.

Can you add a calculated field to a PivotTable in Google Sheets?

Calculated fields with SUM or a custom formula On your computer, open a spreadsheet in Google Sheets. Click the pop-up Edit button underneath the pivot table. click Calculated field. Calculate a value with SUM: Next to “Summarize by,” click SUM.