Aller au contenu

Leçon 9 · Tables and Charts

Designing Report Tables

Design report tables people can scan: when to use a table, column order, alignment, sorting, totals, highlighting and long lists, with a runnable text example.

Charts get most of the attention, but many reports are mainly tables. A table is the right choice when readers need exact values, want to look up a particular row or must compare several measures for each item. A well-designed table can be read in seconds. A poor one forces the reader to hunt.

Table or chart?

The reader needs to Prefer
Look up an exact value Table
See a trend or shape Chart
Compare several measures per item Table
Compare the sizes of a few categories at a glance Bar chart
Act on specific records Table (a work list)

You can combine them: a chart that shows the pattern and a short table that gives the values.

Give the table a job

Before you design, finish this sentence: "A reader uses this table to ..." For example, "to find which warehouses miss the late-delivery target". That job decides what comes first, how rows are sorted and which columns you can delete. Each extra column costs attention.

A good order is usually: the label on the left, then the main measure, then its comparison, then supporting detail. Put columns that must be compared next to each other.

Layout rules that help

  • Align numbers to the right and text to the left. Digits then line up, and larger values are visibly longer.
  • Use the same number of decimals within a column.
  • Put units in the header, such as "Revenue (USD thousands)", and not after every value.
  • Sort by what matters. Alphabetical order helps lookup. Order by value helps find the best and worst. Keep a natural order, such as months or age bands.
  • Keep lines light. Use white space or faint row separators instead of a heavy grid.
  • Mark totals clearly and separate them from the rows.
  • Name periods exactly. "Nov 2026" is better than "Current".

From messy to readable

The program below prints the same data twice. The first version looks like a raw export. The second sorts by the problem measure, rounds consistently, aligns numbers and adds a total that is calculated from the parts.

Python Raw dump versus designed table

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The total rate is calculated as all late orders divided by all orders, not as the average of the four rates. See ratios, averages and percentages.

Highlight with restraint

Highlighting works only when most of the table is quiet. If every cell has a color, nothing stands out. Highlight exceptions, such as rows above a limit, and explain the rule in the title or a note. Do not rely on color alone: add a word or symbol so that the meaning survives grayscale printing and color vision differences.

Small in-cell bars or a tiny trend line (a sparkline) can add shape without taking much space. Use one scale for bars in the same column. State whether sparklines share a scale, because separate scales can make a tiny change look as large as a big one.

Totals and subtotals

Totals help only if they make sense. Do not add percentages, averages, distinct counts or values in mixed currencies. If rows overlap, for example orders tagged with several categories, a sum of rows counts some orders twice, so say that or leave the total out. SQL can build subtotals at the right grain, as in rollup and subtotals.

Missing, zero and not applicable

These three mean different things, so show them differently.

TEXT
0      measured, and the result is zero
n/a    the measure does not apply (for example, a store not yet open)
--     data is missing or late (explain in a footnote)

A blank cell is ambiguous. Readers will guess, and they may guess zero.

Long tables

On screen, keep headers visible while scrolling if your tool allows it. For a long list, show the rows that need action first, then offer the full data as a download or a drill-down. In a printed report, repeat headers on each page and avoid splitting one record across pages.

When a table will be read by a screen reader, use real table markup with header cells and a caption, not a picture of a table.

Review a table before you send it

Read your table as a stranger would. Cover the surrounding text and ask what you can learn from the title, headers and notes alone. You should know the population, the period, the units and the sort order.

Then try the question test. Write two questions the table is meant to answer, for example "Which warehouse has the highest late rate?" and "How many orders did it handle?" Ask a colleague to answer them while you watch. If answering needs a search across distant columns or mental arithmetic, change the design: move columns together, or add the calculated difference as its own column.

Finally, look for columns that never differ. A column in which every row says "USD" or "Nov 2026" belongs in the title or header. Columns that repeat the same information in two forms, such as a code and a name that readers already know, can usually lose one. Removing them gives the remaining columns room and makes the table easier to read on a narrow screen.

Do not hide rows without saying so. If a table shows only the top 10, label it "Top 10 by late orders" and show how much of the total they cover, or add an "Other" row.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. When is a table usually better than a chart?

    Tables are built for precise lookup and multi-measure comparison.
  2. 2. How should numbers in a column usually be aligned?

    Right alignment with equal decimals lines up place values.
  3. 3. A store was not open during the period. What belongs in its sales cell?

    Zero would claim the store sold nothing. The measure does not apply.
  4. 4. Which total is safe to add up across rows without extra work?

    Non-overlapping counts add correctly. Percentages and distinct counts usually do not.

Summary

  • Use tables for exact values, lookup and several measures per item.
  • Decide the table's job, then order columns and rows to serve it.
  • Right-align numbers, keep decimals consistent and put units in headers.
  • Highlight only exceptions, and never rely on color alone.
  • Add totals only when they are meaningful, and show missing, zero and not applicable differently.

Next: Choosing Charts for Reports

Votre progression est enregistrée dans ce navigateur. Aucun compte nécessaire.