Skip to content

Chart builder

A chart groups and totals a dataset’s rows and draws them. You do not write the query: you choose the dimensions, measures and filters, and Defthand builds the query. Only you see your charts; others see them through dashboards.

Reports → Charts. List columns are Name, Type, Dataset and Updated. You can narrow the list to one dataset with the Dataset filter.

If you have no charts yet, the page says No charts yet. If you have no datasets, the chart builder says Create a dataset first; Go to datasets takes you to datasets.

  • A dimension is what rows are grouped by: location, month, status, org unit… On the chart it is usually the horizontal axis, a slice or a series.
  • A measure is the number calculated for each group: how many rows, a total, an average… On the chart it is usually the length of a bar or the height of a line.

In a “Inspection count by location” chart, the dimension is location and the measure is inspection count.

  1. Click New chart, or use Create chart on a dataset’s page.
  2. Choose a Dataset (Choose a dataset). The chart is built from this dataset’s columns.
  3. Enter a Name (required, at most 100 characters) and optionally a Description (at most 1000 characters).
  4. Choose the type in the Chart type section. A short description appears under each type. The types and how many dimensions/measures they take: Chart types.
  5. Fill in the Dimensions section (below).
  6. Choose the measures (below).
  7. Optionally add Filters.
  8. Set up the Sort and limit section.
  9. Set the type-specific options in the Appearance section.
  10. Check the result in the Live preview section, then click Save. The message “Chart saved.” appears.

Each section’s hint line says how many dimensions and measures the chosen type takes. If the definition does not fit the type, the preview and saving explain the problem.

  1. Click Add dimension.
  2. Choose a Column.
  3. For date columns, choose a Time grain: None, Day, Week, Month, Quarter, Year. For example Month gathers dates into months (“November 2026”). Quarters read like “Q4 2026”.
  4. To remove a dimension, click the remove button next to it.

In bar, line and area charts a second dimension splits the series: if you add location as a second dimension to “Inspection count by month”, each location becomes its own line. With two dimensions only one measure can be chosen.

In a pivot table the section splits in two: Row dimensions and Column dimensions.

The same column cannot be a dimension twice.

  1. Add a measure.
  2. In the Measure field choose the source:
    • a measure defined in the dataset, shown as Saved: … with its display label and name (Datasets),
    • An aggregate for this chart: here you choose an Aggregate (Count, Count distinct, Sum, Average, Minimum, Maximum) and a Column.
  3. Optionally give an Output name. If you leave it empty, the measure’s name is used.

In charts other than tables a measure must be a number: minimum and maximum can only be used on a numeric column. The output names of dimensions and measures must differ.

Filters narrow the rows before grouping.

  1. Click Add filter.
  2. Choose a Column.
  3. Choose a Condition:
Condition Value Example
Equals One value Passed equals Yes
Is one of One or more values Location is one of İzmir Fabrikası, Manisa Deposu
Between Two values (a range) Submitted on between 2026-01-01 and 2026-12-31
Contains A piece of text Plate contains 35
Is empty Takes no value Notes is empty
Is not empty Takes no value Score is not empty
  1. Enter the value. Write dates as 2026-11-01.

Every filter needs a column and (except Is empty / Is not empty) a value. A chart’s filter always applies; viewers cannot change it. For filters viewers can change, add filters to the dashboard: Dashboard filters.

  • Sort by: Choose a dimension or a measure. With Default, pie and funnel sort from the largest, other types by their dimensions.
  • Direction: Ascending or Descending.
  • Row limit: The most rows the chart shows. If left empty, 10,000. At least 1.

For “The 10 locations with the most findings”: sort by the measure, Descending, and enter 10 as the Row limit.

Depending on the type, these options appear:

Option Type Meaning
Bar direction Bar Vertical or Horizontal. Horizontal reads better with long category names.
Stack the series Bar, area Series are stacked on top of each other; the total height shows the whole.
Donut (hollow centre) Pie Draws the pie as a donut.
Scale start / Scale end Gauge The two ends of the scale. If you leave the scale end empty, a round number above the value is chosen.
…: drawn as Mixed Whether each measure is drawn as a Bar or a Line.

The preview updates as you change the definition.

  • If the definition is incomplete: “Complete the definition to see a preview.”
  • While preparing: “Preparing the preview…”
  • For an unsaved definition: “A preview of the unsaved definition; export uses the saved one.”
  • If the result is empty: “No rows for the chart. Try loosening the filters.”

On a long page, Go to preview jumps straight to the preview.

On a saved chart, the Chart data section shows the result:

  • the row count and time (“42 rows · 120 ms”),
  • where the result came from: from the cache, ran now, cached, ran now, too large to cache or cache off.

Buttons:

  • Refresh: Skips the cache and runs the query again (“The data ran again.”).
  • CSV file / Excel file: Downloads the chart’s data as a file. Export uses the chart’s saved version.
  • Generated query: Shows the query Defthand wrote for the chart.

A chart can be read in the Chart and Table views, and pivot charts in the Pivot view too.

A chart returns at most 10,000 rows. If the result is cut at the limit, it says “The result was cut at the limit; not all of it is shown.” A pivot table shows at most 200 column values (“Only the first 200 columns are shown; there are more column values.”).

Click the chart in the list, change it and click Save. If the chart is used on dashboards, the change shows there too.

If the dataset’s SQL changes and a column the chart uses disappears, the chart says “The dataset changed and a column this chart uses is gone.” The missing column shows with the label (not in the dataset). Take it out of the dimensions, measures and filters and save the chart again.

  1. Click Delete. The Delete chart dialog says “The chart “…” will be deleted. It cannot be deleted while a dashboard shows it.”
  2. Confirm. The message “Chart deleted.” appears.

If a dashboard shows it, the message “2 dashboards show this chart. Take it off them first.” appears.

Example: average score by month and location

Section titled “Example: average score by month and location”

From the “Inspections and locations” dataset (Datasets):

Section Choice
Name Monthly average score
Chart type Line
Dimensions Submitted on, Time grain Month; Location
Measure Saved: Average score
Filters Submitted on Between 2026-01-01 – 2026-12-31
Sort and limit Default

Result: a separate line for each location, with the months of 2026 on the horizontal axis.