Sub topic 10
Show values as a percentage of a total
This chapter covers the Show as setting on a pivot table value. It turns a summarized number into a share of a row, column or grand total. It assumes you can build a pivot table with rows, columns and values, and that you know how Summarize by works (SUM, COUNT, AVERAGE). It also assumes you have met manual groups, date groups and calculated fields from earlier chapters. The running example is the five-row sales table used throughout this tutorial (Date, Region, Product, Units, Revenue, Cost).
What Show as does
Show as is a setting on each value field in the pivot table editor. It changes how the summarized number is displayed. It does not change the summary itself. Google Sheets first computes the value with the Summarize by function, such as SUM. If Show as is not Default, it then divides that value by a total and shows the result as a percentage.
Show as offers four choices:
| Option | Divides each value by | Typical question it answers |
|---|---|---|
| Default | Nothing. The value is shown as is. | How much revenue is there? |
| % of row total | The total of the row the cell sits in | Within each region, how is revenue split across products? |
| % of column total | The total of the column the cell sits in | For each product, which regions contribute? |
| % of grand total | The total of all cells for that value field | What share of all revenue does this cell represent? |
Two points follow from this order of operations:
- Show as sits on top of Summarize by. If you summarize with COUNT, you get shares of counts. If you summarize with SUM, you get shares of sums.
- Each value field has its own Show as setting. You can add the same source column to Values twice, leave one at Default and set the other to a percentage. The pivot then shows the amount and its share side by side.
Set it up
- Select the source range and choose Insert, Pivot table.
- In the editor, add Region to Rows.
- Next to Values, click Add and choose Revenue. Leave Summarize by as SUM.
- In the Revenue value card, open the Show as dropdown and choose % of grand total.
The pivot table now shows each region's revenue as a share of all revenue. With the sample data, total revenue is 1550:
| Region | SUM of Revenue | % of grand total |
|---|---|---|
| West | 670 | 43.2% |
| East | 700 | 45.2% |
| South | 180 | 11.6% |
| Grand total | 1550 | 100.0% |
The shares add up to 100% because the grand total is the sum of the visible rows.
Row, column and grand total in a two-way table
The three percentage options differ only when the table has both rows and columns. Put Region in Rows, Product in Columns, and Revenue (SUM) in Values. At Default, the table looks like this:
| Region | Widget | Gadget | Gizmo | Total |
|---|---|---|---|---|
| West | 250 | 420 | (blank) | 670 |
| East | 100 | (blank) | 600 | 700 |
| South | (blank) | 180 | (blank) | 180 |
| Total | 350 | 600 | 600 | 1550 |
Now compare the three options for the West and Widget cell, which holds 250:
- % of row total gives 250 / 670 = 37.3%. This is Widget's share of West revenue.
- % of column total gives 250 / 350 = 71.4%. This is West's share of Widget revenue.
- % of grand total gives 250 / 1550 = 16.1%. This is the share of all revenue that comes from West Widget sales.
The three versions answer different questions, so check which one you need. With % of row total, each row adds to 100%. With % of column total, each column adds to 100%. With % of grand total, only the whole table adds to 100%.
Here is the whole table under % of row total:
| Region | Widget | Gadget | Gizmo | Total |
|---|---|---|---|---|
| West | 37.3% | 62.7% | (blank) | 100.0% |
| East | 14.3% | (blank) | 85.7% | 100.0% |
| South | (blank) | 100.0% | (blank) | 100.0% |
The South row shows 100% for Gadget because Gadget is the only product sold in South. A 100% cell often means a thin slice of data, not a dominant category. Read the underlying count before drawing conclusions.
Choosing the option
A quick rule of thumb:
- Use % of grand total to see each item's weight in the whole.
- Use % of row total to compare the mix inside each row, such as product mix per region.
- Use % of column total to compare the mix inside each column, such as regional contribution per product.
Show as and groups
Show as operates on the pivot's items after grouping, so it works with the grouping features from earlier chapters.
- Date groups. Group the Date column by Month and put it in Rows with Revenue (SUM) set to % of grand total. You get each month's share of the period's revenue. Months with no data do not appear, so the percentages add up only over the months shown.
- Manual groups. If you group West and East into a group named "Core regions", the percentage is calculated for the group as a whole. The group's share is the sum of its members' shares. A manual group therefore never changes the grand total. It only changes how the rows are divided.
- Numeric groups. If you bucket Units into intervals, Show as gives the share of revenue (or counts) falling into each interval. This is a quick way to build a distribution table.
Filters change the denominator too. Percentages are calculated from the rows that pass the pivot's filters, so a filtered pivot table reports shares of the filtered total, not of the whole source. If you filter out South, the other regions' shares rise to fill 100%.
Show as with calculated fields
A calculated field is a value like any other, so it has its own Show as setting. Add the Profit calculated field (=Revenue - Cost) to Values and set it to % of grand total. Total profit is 1550 − 980 = 570, so the regions come out like this:
| Region | SUM of Profit | % of grand total |
|---|---|---|
| West | 275 | 48.2% |
| East | 220 | 38.6% |
| South | 75 | 13.2% |
Compare this with the revenue shares above. West produces 43.2% of revenue but 48.2% of profit, and East produces 45.2% of revenue but only 38.6% of profit. That difference is the kind of insight a share view makes visible.
Be careful with calculated fields that are ratios. Take the custom formula from the aggregation chapter, with Summarize by set to Custom:
=SUM(Revenue) / SUM(Units)For each region this gives revenue per unit: West 670 / 17 ≈ 39.4, East 700 / 16 = 43.75, South 180 / 3 = 60. The grand total is not a sum of those three values. It is the ratio of the totals, 1550 / 36 ≈ 43.1. If you apply % of grand total to this field, each region is divided by 43.1. The percentages will not add up to 100%, and in this example they total well over 100%. This is expected behavior, not an error. A share-of-total view only makes sense for additive measures such as revenue, units, cost and profit. For a ratio, keep Default and show the ratio itself.
If you want a ratio and its weight in the same table, add two fields. Show the ratio at Default and add SUM of Revenue at % of grand total next to it.
Check the percentages against the source
You can verify any percentage with an ordinary formula outside the pivot table. For West's share of revenue, with the sample data in A1:F6 (headers in row 1), enter:
=SUMIF(B2:B6, "West", E2:E6) / SUM(E2:E6)The result is 0.4323, which Sheets shows as 43.2% when the cell is formatted as a percentage. If it matches the pivot, your grouping and filters behave as expected. If it does not match, look for filters on the pivot, text-formatted numbers, or a source range that does not cover all rows.
Common problems
- The percentages add to less than 100%. The pivot has a filter, or you are adding only some of the rows. Check the filter settings and confirm that the Grand total row is turned on under Rows and Columns.
- Every cell shows 100%. You chose % of row total with no column field, or % of column total with no row field. Add the missing dimension or switch to % of grand total.
- The percentages look right but are shown as decimals. Show as normally formats the cell as a percentage. If you have set a custom number format on the pivot range, remove it so that the percentage format can apply.
- A group's share seems too large. A manual group collects every item you placed in it. Open the group and check its members. An item added by mistake adds its revenue to the group's share.
- The shares change when you add a field. Adding a second Rows field splits each existing row into sub-rows. Row totals then stay the same, but a cell is now divided by its own row's total, so each sub-row's share is smaller than before.
- Percentages of a custom ratio look wrong. See the previous section. The measure is not additive, so use Default.
Summary
Show as is a display layer on top of Summarize by. It divides each summarized value by its row, column or grand total. It respects filters, groups and calculated fields, but it is only meaningful for additive measures. Pick the option that matches the question, check that the denominator is what you expect, and confirm one cell with a SUMIF formula before you share the table.
Exercise
In a pivot table with Region in Rows and Product in Columns, the Revenue value is set to % of column total. What does the cell for East and Gizmo show, and why? Use the sample data (East Gizmo revenue is 600; the Gizmo column total is 600).
Show answer
It shows 100.0%. % of column total divides each cell by the total of its own column. East is the only region with Gizmo sales, so 600 / 600 = 100%. This does not mean East dominates revenue overall. It only means East is the only contributor to the Gizmo column.
Exercise
You add a calculated field with the formula =SUM(Revenue) / SUM(Units), set Summarize by to Custom, and then set Show as to % of grand total. The regional percentages add up to well over 100%. Is this a bug, and what should you do instead?
Show answer
It is not a bug. The grand total of this field is a ratio of totals (1550 / 36), not the sum of the regional ratios, so dividing each regional ratio by it does not produce shares that add up to 100%. Show as only makes sense for additive measures such as revenue, units or profit. Keep the ratio at Default, and if you want to show weight, add SUM of Revenue as a second value with % of grand total.
Exercise
Write a formula outside the pivot table that checks the Profit share for the East region (% of grand total), given Region in column B, Revenue in column E and Cost in column F, with data in rows 2 to 6. What value should it return for the sample data?
Show answer
=(SUMIF(B2:B6, "East", E2:E6) - SUMIF(B2:B6, "East", F2:F6)) / (SUM(E2:E6) - SUM(F2:F6)). East profit is 700 - 420... more precisely, East revenue is 700 and East cost is 480, so profit is 220. Total profit is 1550 - 980 = 570. The result is 220 / 570 ≈ 0.386, shown as 38.6%.