Sub topic 9
Showing values as percentages
This chapter covers the Show as option in the pivot table editor. It assumes you can already build a pivot table with Rows, Columns and Values, and that you know how Summarize by works. Each Show as option changes how a number is displayed. The underlying aggregation stays the same.
What Show as does
Show as is a dropdown under each field in the Values section. The default is Default, which shows the raw result of Summarize by. The other options convert that result into a percentage of some reference total.
The options are:
- % of row: each cell divided by the total of its row.
- % of column: each cell divided by the total of its column.
- % of grand total: each cell divided by the total of the whole table.
Show as is applied after Summarize by. A Sum of Revenue shown as % of column first sums revenue, then divides each sum by the column total. If you pick Summarize by COUNTA, the percentages are shares of counts, not shares of money.
Example data
The examples use a Sales sheet with a header row and these columns: A Date, B Region, C Product, D Units, E Revenue.
| Region | Product | Revenue |
|---|---|---|
| West | Widget | 400 |
| West | Gadget | 600 |
| East | Widget | 700 |
| East | Gadget | 300 |
Build a pivot table with Region in Rows, Product in Columns, and Sum of Revenue in Values. With Show as set to Default, the result is:
| Region | Gadget | Widget | Grand Total |
|---|---|---|---|
| East | 300 | 700 | 1000 |
| West | 600 | 400 | 1000 |
| Grand Total | 900 | 1100 | 2000 |
Choosing a reference total
The choice of option depends on the question you are asking. Each option fixes a different denominator.
% of row
Each cell is divided by its row total. Use it to ask: within each region, what share of revenue comes from each product?
| Region | Gadget | Widget | Grand Total |
|---|---|---|---|
| East | 30% | 70% | 100% |
| West | 60% | 40% | 100% |
Every row adds up to 100%. This lets you compare product mix across regions even when the regions differ in size.
% of column
Each cell is divided by its column total. Use it to ask: for each product, which region contributes what share?
| Region | Gadget | Widget |
|---|---|---|
| East | 33.3% | 63.6% |
| West | 66.7% | 36.4% |
Every column adds up to 100%. The Gadget column is 300/900 and 600/900.
% of grand total
Each cell is divided by the total of the whole table (2000 in this example). Use it to ask: what share of all revenue does each combination represent?
| Region | Gadget | Widget | Grand Total |
|---|---|---|---|
| East | 15% | 35% | 50% |
| West | 30% | 20% | 50% |
| Grand Total | 45% | 55% | 100% |
Only the whole table adds up to 100%. Individual rows and columns do not.
Steps to apply a percentage
- Click any cell inside the pivot table to open the pivot table editor.
- In the Values section, find the field you want to change.
- Open the Show as dropdown on that field.
- Choose % of row, % of column or % of grand total.
The pivot table updates at once. Sheets applies percentage number formatting to the displayed cells, so you do not need to format them yourself.
Showing a value twice
You can add the same source field to Values more than once. Each copy has its own Summarize by and Show as settings. This is the usual way to show an amount next to its share.
For example, add Revenue twice:
- Revenue, Summarize by SUM, Show as Default.
- Revenue, Summarize by SUM, Show as % of grand total.
With Region in Rows only, the pivot table shows two value columns per region: the revenue amount and its share of the total. You can edit each field's display name in the editor so that the second one reads "Share of revenue" and not "SUM of Revenue".
When Columns also contain a field, each value appears under every column item. That can make the table wide, so consider keeping Columns empty when you show two measures.
How percentages interact with other settings
Totals
Show as depends on the totals being calculated. If you turn off Show totals for a Rows or Columns field, the table hides those total lines. The percentages are still computed against the full totals, so visible cells in a % of row table still add up to 100% across the whole row, even without a total column. Hidden totals do not change the denominators.
Filters
Filters change the denominators. If a filter excludes Gadget, the grand total covers only Widget, and % of grand total is calculated within the filtered data. A percentage in a filtered pivot table is a share of the visible data, not of the original source. Label the table so readers know this.
Sorting
You can sort by a value shown as a percentage. Sorting uses the displayed measure, so ordering by % of grand total ranks rows by share. Because the percentage is a monotonic function of the sum within one column, the order matches the order of the raw sums in most layouts. It can differ when you sort rows by a column of % of row values, because the denominators differ by row.
Summarize by
Percentages work with Sum and Count as you would expect. With Average, % of column divides each average by the column's total average, which usually has little meaning. Choose Sum or Count when you want shares.
Common errors
- Shares add up to the wrong thing. Percentages that sum to 100% across a row but not down a column mean you picked % of row. Check the option before reading the table.
- Percentages are shares of counts. If Summarize by is COUNTA, the percentage counts records. Check Summarize by when the percentages look odd.
- Share of a filtered set. The denominators follow the filter. Remove the filter to see the share of the whole.
- Blank or text values. Text in a numeric column is ignored by Sum. The affected rows are missing from the denominator, so shares look larger than expected. Clean the source data first.
- Rounding. Displayed percentages are rounded, so a column may appear to add up to 99.9% or 100.1%. The underlying values are exact. Adjust decimals with Format > Number if you need more precision.
Cross-checking a percentage with a formula
Verify a percentage by computing the same share directly from the source data. This formula returns the West share of total revenue:
=SUMIFS(Sales!E:E, Sales!B:B, "West") / SUM(Sales!E:E)With the example data it returns 0.5, which matches the West % of grand total in the pivot table (30% + 20%). Format the cell as a percentage to compare it visually.
For a share within a product, add a second condition:
=SUMIFS(Sales!E:E, Sales!B:B, "West", Sales!C:C, "Gadget") / SUMIFS(Sales!E:E, Sales!C:C, "Gadget")This returns 0.6667, the West cell in the Gadget column under % of column.
Choosing the right option
The following diagram helps choose the reference total.
Exercises
Exercise
A pivot table has Region in Rows, Product in Columns and Sum of Revenue in Values. Each row of the table should add up to 100%, so you can compare product mix between regions. Which Show as option do you choose?
Show answer
% of row. Each cell is divided by its row total, so every row sums to 100%.
Exercise
In the example data, East sells Widgets for 700 and the Widget column total is 1100. What does the East cell show under % of column, and what does it show under % of grand total?
Show answer
Under % of column it shows 700 / 1100 = 63.6%. Under % of grand total it shows 700 / 2000 = 35%.
Exercise
You add a filter that excludes the Gadget product. The West/Widget cell was 20% under % of grand total. Will it still show 20%? Explain.
Show answer
No. The filter removes Gadget from the data, so the grand total becomes 1100 and not 2000. West/Widget is 400 / 1100, about 36.4%. Percentages are calculated from the filtered data.
Exercise
Write a formula that returns the share of total revenue that comes from East, using the Sales sheet where Region is column B and Revenue is column E.
Show answer
=SUMIFS(Sales!E:E, Sales!B:B, "East") / SUM(Sales!E:E)