Cross-tab matrixA table with totals on the edges.
One category down the side, another across the top, a number where they meet. Totals on the right and at the bottom, the grand total in the corner.
- Answers I need the exact numbers
- Your data one number per pair of categories
- Rows about 3 to 20
- Columns about 2 to 12
- Excel and Power BI a PivotTable or matrix visual
What is a cross-tab matrix?
A cross-tab matrix (also a pivot table or contingency table) puts one category down the side and another across the top, with a number in every cell where they meet. A total column on the right adds up each row, a total row at the bottom adds up each column, and the grand total sits in the corner. It answers two questions at once: how each row splits across the columns, and how the parts add up.
Sales of four regions over three months, in thousands of euros. East leads every month, and every region grew in March.
Why use a cross-tab matrix?
Because many questions have two sides.
- Two categories at once. Region and month in one view.
- Totals for free. Each row, each column and the whole.
- Exact numbers. Readers can quote any cell.
- Familiar. Everyone who uses spreadsheets knows pivot tables.
How does a cross-tab matrix work?
Four steps build a cross-tab.
- Step 1 of 4Two categoriesRegions down the side, months across the top.
- Step 2 of 4A number per cellSales where each region meets each month.
- Step 3 of 4Totals on the edgesEach row and column added up; 1,395 in the corner.
- Step 4 of 4Shade the cellsDarker for more: East in March stands out.
What are the parts of a cross-tab matrix?
Four parts, and each one has a job.
- Cellone region in one month
- Row totalone region over all months
- Column totalone month over all regions
- Grand totaleverything
How do you read a cross-tab matrix?
Three looks, in this order.
- Read the corner1,395 thousand euros in three months.
- Read the edgesEast is the biggest region: 455 of 1,395.
- Read down a columnMarch is the best month in every region but North.
What kinds of cross-tab matrix are there?
The same sales, three ways.
- Kind 1NumbersCells and totals.
- Kind 2Heat coloursDarker cells for more.
- Kind 3Data barsA bar behind each number.
Cells can also show shares instead of amounts (each cell as a percent of its row, or of its column), which answers "what share of North's sales came in March?". Rows and columns can be nested, such as regions with their cities below.
When should you use a cross-tab matrix?
When a number depends on two categories and the totals matter.
- each number belongs to two categories
- totals matter
- readers need exact values
- the grid is small enough to read
- the pattern matters more than values (a heat map)
- one category is time and the trend matters (a line chart)
- the grid is huge (filters, or a chart)
Cross-tab matrix or heat map?
Numbers with totals, or colours without.
The heat map shows the pattern first: East is dark, West is light. The cross-tab matrix gives exact numbers and the totals, so readers can say East sold 455 thousand of 1,395.
How do you make a cross-tab matrix?
A table of rows, columns and values, in Excel or Power BI.
In Excel, select the data and choose Insert > PivotTable, then drag one field to Rows, one to Columns and a number to Values; totals come on their own. In Power BI, the matrix visual does the same, with subtotals, grand totals and drill-down (matrix visual); conditional formatting adds heat colours (conditional formatting).
What goes wrong with cross-tab matrices?
The most common mistake, and its fix: too big to read.
- a few rows and columns, sorted, with heat colours to guide the eye
- filters for the rest
| Mistake | Why it hurts | Fix |
|---|---|---|
| Too many rows and columns | A wall of numbers | Fewer, or filters |
| Totals that do not add up | Trust is lost | Totals from the same data, or say why |
| Unsorted rows | Patterns hide | Sort by the total |
| Shares without saying of what | Row share or column share? | Say "of row" or "of column" |
| No visual guide | Hard to scan | Heat colours or data bars |
Every chart for “I need the exact numbers”
Read on, step by step.
Does it fit your data? Try it.
Paste your table into Chart Compass, say what the chart should show, and see the charts that fit, drawn with your own numbers. It runs in your browser, so the data stays with you.