Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 37 ยท Panels and Visualizations

The Table Panel: Columns, Cell Types and Sorting

Build useful tables in Grafana: instant queries, column overrides, cell display modes, sorting and filtering, footers with totals, data links and pagination.

Graphs show shape; tables show exact values. The Table panel is the right choice for listings (top pages, failing jobs, disks and their usage), for comparing many series by several measures at once, and as a debugging companion to any graph. It works with any query that returns rows and columns, such as SQL results or PromQL instant queries formatted as Table.

Getting table data

  • SQL: Format as Table; each column of the result is a column in the panel.
  • Prometheus: set Format to Table and Type to Instant. Each series becomes a row, labels become columns, and the value is Value #A for query A. With several queries (A, B, C) apply the Merge or Join by field transformation to combine them into one row per label set.
  • Loki: log queries in a Table show timestamp and line; use parsers to get more columns.

Column options

Open Table options for global settings and use Overrides for single columns:

Option Effect
Column width / min width Layout
Cell alignment Left, center or right (numbers read best right-aligned)
Cell type Auto, Colored text, Colored background, Gauge, Gradient gauge, LCD gauge, JSON view, Image, Sparkline and more
Wrap text / Inspect value Long strings
Unit, decimals, thresholds Standard options per column

A very effective pattern: a CPU column displayed as Gauge with thresholds shows ranking and severity at a glance. A status column with value mappings and Colored background reads like a traffic light.

Sorting, filtering, pagination

  • Click a header to sort; Shift+click adds secondary sorting. Set the default under Table options > Default sort.
  • Enable Column filter (a funnel icon per column) so viewers can filter by value.
  • Turn on Pagination for long results, and Show header or Cell height to tune density.

Enable Show table footer, choose a Calculation (Sum, Mean, Max, Count...) and the fields it applies to. Footers are great for totals: revenue per product with a Sum at the bottom.

Add a Data link to a column so clicking a cell opens another dashboard or URL with the row's values: /d/service-detail?var-service=${__data.fields.service}. Tables with data links become navigation hubs: a list of services where each name leads to a detail dashboard.

Nested tables and row expansion

When results contain several frames (one per query), the table has a Frame selector. With a Nested tables data layout, a parent row can expand into child rows; most beginners can ignore this and merge frames instead.

This stand-in performs the three operations a table panel offers, on sample rows.

JS Stand-in: sort, filter, total

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

No output.

Stand-in: merge two query results

Two instant queries (requests and errors) arrive as separate frames. Join by field merges them on a key, like a SQL join.

JS Stand-in: join by field

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

No output.

Design guidelines

  • Fewer columns beat more: choose the five that answer the question.
  • Right-align numbers, left-align text, and keep units in headers or cells, not both.
  • Use color sparingly: only on columns that signal state.
  • Limit rows (top 10) or paginate; a thousand-row table is a data export, not a panel.
  • Name columns clearly with Rename by regex or Organize fields transformations (next chapter).

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which Prometheus settings give a table with one row per series?

    An instant query formatted as a table returns one row per series.
  2. 2. Which cell type draws a colored bar inside a table cell?

    Gauge, gradient gauge and LCD gauge cell types show bars scaled by min/max.
  3. 3. How can viewers narrow the rows themselves?

    The column filter option adds a per-column filter control.
  4. 4. What does a table footer typically show?

    Footers apply a calculation to selected fields, e.g. totals.

Summary

  • Tables show exact values from SQL results or instant queries.
  • Cell types, thresholds and mappings turn columns into visual signals.
  • Sorting, filtering, pagination and footers help readers explore.
  • Data links make tables navigation hubs.
  • Keep tables narrow and short; merge frames when needed.

Next: Thresholds, Value Mappings and Overrides