Skip to main content

Complete examples

The examples on this page show dashboards built from scratch, from the form to the saved dashboard. Each one brings together several features from the previous pages and can serve as a starting point for similar dashboards. The names of sites, divisions and fields are illustrative: adjust them to the names in your form, as checked in Discover.

ExampleFeatures used
5S audit: monthly closing and year to dateCards with color by value, per-chart time range, target line, several metrics, ranking, heat-map table, chained controls.
Several forms in one dashboardData source with wildcard, Filters grouping with _index, stacked bars, per-chart filter.
Rates and funnels of a field surveyFormulas with count(kql=...), funnel with Filters, age bands, weekly trend.
Tank levels from readingsFormula with last_value, card with progress bar per tank, gauge.
Defect count in a transposed indexSum of the value field, ranking by label, monthly trend.

5S audit: monthly closing and year to date​

A 5S audit form with five sections (Sort, Set in order, Shine, Standardize and Sustain), applied monthly at several sites. The target is 70% compliance. The dashboard should show each month's closing, the year to date, the result by pillar and the site ranking.

1. Prepare the form​

Calculated fields by tag, one per pillar and one for the total, with the percentage from 0 to 100. Question names following the standard:

FieldContent
perc-total-5sTotal audit percentage
perc-sortSort pillar percentage
perc-set-in-orderSet in order pillar percentage
perc-shineShine pillar percentage
perc-standardizeStandardize pillar percentage
perc-sustainSustain pillar percentage
division, region, siteIdentification of the audited site

Submit a test audit and check in Discover that every perc-* field arrives as a number.

2. Dashboard structure​

PositionContentTime range
TopControls: Division, Region, Site—
Row 16 cards: 5S Total and one per pillarYear to date (own)
Row 25S Total month by month, with target lineDashboard's
Row 3Trend by pillar (5 lines)Dashboard's
Row 4Site ranking and site × pillar tableDashboard's

3. Year-to-date cards​

For each of the 6 indicators:

  1. Add → Visualization, type Metric.
  2. Primary metric: Average of perc-total-5s (then one card for each perc-*).
  3. Name: "5S Total" (or the pillar name).
  4. Value format: Number, 1 decimal, % suffix.
  5. Color: Dynamic, with the ranges:
FromColor
0Red #E53E3E
60Yellow #ECC94B
70Light green #9AE6B4
80Green #48BB78
85Dark green #2F855A
  1. Save and return.
  2. In the dashboard, ⋯ → Settings on the card → Apply custom time range → year to date (see Most used ranges).
  3. Card title: "5S Total – year to date".

After creating the first card, use ⋯ → Duplicate and change only the field and name for the other five.

4. 5S Total month by month​

  1. Type Bar (vertical).
  2. Horizontal axis: date, Date histogram, Minimum interval: Month.
  3. Vertical axis: Average of perc-total-5s, Name "5S Total", Number with % suffix.
  4. Add layer → Reference lines: Static value 70, Name "Target 70%", dashed line.
  5. Value labels: Show.
  6. Vertical axis: Bounds → Custom, from 0 to 100. Axis title → Custom: "Compliance (%)". Horizontal axis: Axis title → Custom: "Month".
  7. Title: "5S Total – Monthly Closing (%)".

5. Trend by pillar​

  1. Type Line.
  2. Horizontal axis: date, Month.
  3. Vertical axis: five metrics, all Average, with the same format (Number, % suffix): perc-sort, perc-set-in-order, perc-shine, perc-standardize, perc-sustain. Give each the pillar name and its own color.
  4. Target line at 70 and axis from 0 to 100.
  5. Legend: Bottom.
  6. Title: "Trend by Pillar (%)".
Use Line, not stacked bars

In stacked bars, the five percentages would be added, and each month would get close to 400% or 500%. To compare percentages, use lines or side-by-side bars.

6. Site ranking​

  1. Type Bar, orientation Horizontal.
  2. Categories: site, Top values, Number of values 20, Rank by the average of perc-total-5s, Descending, without the "Other" group.
  3. Metric: Average of perc-total-5s, % suffix.
  4. Target line at 70.
  5. Value labels: Show.
  6. Title: "Site Ranking – 5S Total (%)".

7. Site × pillar table​

  1. Type Table.
  2. Rows: site, Top values, 20 values.
  3. Metrics: six Average metrics: perc-total-5s and the five pillars, with short names ("Total", "Sort"…).
  4. In each metric: Color by value → Cell, with the same ranges as the cards.
  5. Summary row: Average in each column, for the overall average row.
  6. Title: "Result by Site and Pillar (%)".

8. Controls and saving​

  1. Add → Controls, in order: division, region, site, all Options list, with a readable Label.
  2. In the dashboard time picker, choose Last 1 year (or year to date).
  3. Save, with the title "5S – Monthly Closing and Year to Date" and Store time with dashboard selected.
  4. Test: choose a site and check that the cards, charts and table change together. The cards stay on year to date.

Several forms in one dashboard​

Each division has its own best-practices form, with the same questions and the same question names. The indices have descriptions with a common part: best-practices-division-a, best-practices-division-b, best-practices-division-c. The dashboard should show how many best practices each division registered per month and the approval status by site.

Fields used:

FieldContent
siteSite that registered the best practice
bp-own1 when the best practice is the site's own
bp-adopted1 when the best practice was adopted from another site
approvalEvaluation result: "Approved", "Rejected" or "Needs adjustments"

1. Data source​

  1. ☰ → Stack Management → Data Views → Create data view.
  2. Name: "Best Practices – All Divisions".
  3. Index pattern: *best-practices-division*. Check that the three indices appear on the right.
  4. Timestamp field: date.
  5. Save.

2. Check in Discover​

  1. Open Discover with the new data source and a wide time range.
  2. Click the _index field: the three indices should appear, with the number of records in each.
  3. Search for site and approval in the field list: each should appear only once. If different names appear for the same question, the forms are not standardized.

3. Best practices by month and division​

  1. Type Bar, Stacked.
  2. Horizontal axis: date, Month.
  3. Vertical axis: Count of records, Name "Best practices".
  4. Breakdown: the Filters function, with one filter per index:
ExpressionLabel
_index : *division-a*Division A
_index : *division-b*Division B
_index : *division-c*Division C
  1. Value labels: Show. Legend: Bottom.
  2. Title: "Best Practices Registered by Month and Division".

To check: the sum of all bars should equal the total responses of the three forms in the time range. If it is lower, a filter is not matching the right index.

4. Own and adopted by site​

  1. Type Bar, Horizontal, Stacked.
  2. Categories: site, Top values, 20 values, Descending, without "Other".
  3. Metrics: Sum of bp-own ("Own") and Sum of bp-adopted ("Adopted").
  4. Title: "Best Practices by Site".

5. Not-approved card​

  1. Type Metric, Count of records, Name "Not approved".
  2. In the editor's search bar: approval : "Rejected".
  3. Color: Static, red #E53E3E.

6. Status by site​

  1. Type Bar, Horizontal, Stacked.
  2. Categories: site, Top values.
  3. Metric: Count of records.
  4. Breakdown: approval, with Include documents without this field on, to also show those not yet evaluated.
  5. Fixed colors per category: "Approved" in green, "Needs adjustments" in orange (#ED8936), "Rejected" in red.
  6. Title: "Best Practices Status by Site".

Rates and funnels of a field survey​

A screening form applied in the field records whether the person was tested, the result and whether they were referred. The dashboard should show screening volume, positivity and referral rates, the care funnel and the profile by age band.

Fields used: tested ("Yes"/"No"), result ("Positive"/"Negative"/"Indeterminate"), referred ("Yes"/"No"), tested-before ("Yes"/"No"), age (number), region.

1. Indicator cards​

CardFormulaFormat
Screenings performedcount()Number
First-time testerscount(kql='tested-before : "No"') / count()Percent
Positivitycount(kql='result : "Positive"') / count(kql='tested : "Yes"')Percent
Referral of positivescount(kql='result : "Positive" and referred : "Yes"') / count(kql='result : "Positive"')Percent

In each card: type Metric, Primary metric with the Formula tab, and the format from the table.

2. Care funnel​

  1. Type Bar (vertical).
  2. Horizontal axis: the Filters function, with three filters in funnel order:
ExpressionLabel
tested : "Yes"Tested
result : "Positive"Positive
result : "Positive" and referred : "Yes"Referred
  1. Vertical axis: Count of records.
  2. Value labels: Show.
  3. Title: "Care Funnel (people)".

3. Profile by age band​

  1. Type Bar, Horizontal.
  2. Categories: age, the Intervals function, Create custom ranges: from 15 to 20, from 20 to 25, from 25 to 35, from 35 to 50 and from 50 up, labeled "15–19", "20–24", "25–34", "35–49" and "50+".
  3. Metric: Count of records.
  4. Title: "People Screened by Age Band".

4. Weekly trend​

  1. Type Line.
  2. Horizontal axis: date, Week.
  3. Vertical axis: two metrics: Count of records ("Screenings") and Count of records with Filter by result : "Positive" ("Positives").
  4. Title: "Screenings and Positives per Week".

5. Controls​

region and, if available, the organization and the service location, from general to specific.

Health data

Dashboards with health data should not display individual identifiers or individual-level tables. Agree with the data owner on a minimum group size for disclosure. See Handling sensitive data.


Tank levels from readings​

A daily measurement form records, for each tank, the tank code (tank) and the empty space measured from the top down to the product (empty-space). Every tank has a capacity of 500. The level of each tank is the capacity minus the empty space, in the most recent reading.

The measured field is the empty space, not the stock

The larger the empty space, the smaller the stock. That's why the indicator is calculated as capacity minus the reading, not as the reading itself.

1. One card per tank, with a progress bar​

  1. Type Metric.
  2. Primary metric, Formula tab:
500 - last_value('empty-space', kql='empty-space : *')
  1. Name: "Current level". Value format: Number, 0 decimals.
  2. Maximum value: Static value 500. The card now shows a progress bar.
  3. Break down by: tank, Top values, with the number of tanks. One card per tank appears.
  4. Color: Dynamic, with Number ranges: red from 0 to 100 (up to 20% of capacity), yellow from 100 to 200 (20% to 40%) and green from 200 up.
  5. Title: "Current Tank Levels".

2. Gauge for one tank​

To highlight a specific tank:

  1. Type Gauge, shape Vertical bullet.
  2. Metric: the same formula as the card.
  3. Minimum value: 0. Maximum value: 500. Goal value: the minimum safety level.
  4. In the editor's search bar: tank : "TK-01".

3. Level trend​

  1. Type Line.
  2. Horizontal axis: date, Day.
  3. Vertical axis: the formula 500 - average('empty-space').
  4. Breakdown: tank.
Different capacities

If tanks have different capacities, record the capacity in the form (for example, in a calculated field based on the selected tank) and use last_value(capacity) - last_value('empty-space', kql='empty-space : *'). The same formula then works for every tank.


Defect count in a transposed index​

A quality control records the quantity of each defect type in its own question. In the integration, the questions were transposed into two fields: defect-type (the label) and defect-value (the quantity). See Transposed index.

1. Defects by type​

  1. Type Bar, Horizontal.
  2. Categories: defect-type, Top values, Rank by the sum of defect-value, Descending, without "Other".
  3. Metric: Sum of defect-value, Name "Occurrences".
  4. Value labels: Show.
  5. Title: "Defects by Type (occurrences)".

2. Defects by month​

  1. Type Bar, Stacked.
  2. Horizontal axis: date, Month.
  3. Vertical axis: Sum of defect-value.
  4. Breakdown: defect-type, Top values, 5 values, with the "Other" group on for the rest.
  5. Title: "Defects by Month and Type (occurrences)".

3. Distribution of a measure​

To see the distribution of a numeric measure from the same control (for example, part weight), use the form's original index:

  1. Type Bar.
  2. Horizontal axis: weight, the Intervals function, automatic ranges.
  3. Vertical axis: Count of records.

Unexpected values (negative weights, for example) appear at the ends of the chart and indicate entry errors.

Count of records doesn't work here

In a transposed index, Count of records with defect-type on the axis shows the same number for every type, because each collection generates one record per type. Always use Sum of defect-value.