---
title: Weekly report dashboard
slug: how-tos/weekly-report-dashboard
docTags: G8BVEz3koxH3IqjirGj3V,HM2rWeeWAO1-Dgm69CZmi
createdAt: 2026-03-30T00:00:00.000Z
---

## Introduction

This document describes how to set up a weekly production report dashboard. It gives shift leads and production managers a week-by-week overview of batch throughput, energy consumption and quality results across both production lines.

**Audience:** Shift leads, production managers

**Purpose:** Weekly production review and cross-line quality tracking

## Dashboard layout

1. Batch throughput (by line, by recipe)
2. Average energy per batch by recipe
3. Quality results per mixer

## Key design decisions

Before building, two aspects of this dashboard are worth understanding because they shape how everything is wired together.

**All variables are hidden.** Unlike the Operator or Batch Comparison dashboards, `$line`, `$mixer` are all hidden from the dashboard header. Both lines are selected by default, all recipes are included by default, and the user never needs to touch a variable. The only control exposed to the user is the **time picker**, which is pre-configured with weekly quick ranges so the user can step back week by week with a single click.

**The quality panels use&#x20;**`$mixer`\*\*  with `repeat`.\*\* Rather than duplicating panels for Line 1 and Line 2, the donut and stat panels are configured to repeat vertically once per value of the `$mixer` variable. This means the quality section automatically scales if a third line is ever added.

## Step-by-step

:::::ExpandableHeading
### Creating variables `$line`and `$mixer`

::::WorkflowBlock
:::WorkflowBlockItem
Create variable `$line`

Follow the same steps as in the [Operator Dashboard](#) guide, but with one difference: set `Hide` to `Variable` so it does not appear in the dashboard header. Both lines should be selected by default.

- **General**
  - Name: `line`
  - Label: `Line`
  - Hide: `Variable`
- **Query options**
  - Query Type: `Asset`
  - Filter by asset path: `/^Line/`
  - Parent assets: `No parent`
- **Selection options**
  - Multi-value: `Checked`
  - *deselect* 'Allow custom values'
:::

:::WorkflowBlockItem
Create variable `$mixer`

Same as the Operator Dashboard guide, but also hidden.

- **General**
  - Name: `mixer`
  - Label: `Mixer`
  - Hide: `Variable`
- **Query options**
  - Query Type: `Asset`
  - Filter by asset path: `/Mixer$/`
  - Parent assets: `$line`
  - Use asset path as value: `Checked`
    *(This is important. The asset path rather than the asset name is used as the value, because both mixers are called "Mixer", which could lead to confusion.)*
- **Selection options**
  - Include all option: `Checked`
  - Multi-value: `Checked`
  - *deselect* 'Allow custom values'
:::
::::
:::::

::::::ExpandableHeading
### Configure the time picker

Rather than a variable, week navigation is handled entirely through the time picker. The default time range and week start day can be set through the Grafana UI, but you can also set **custom quick ranges by editing the dashboard JSON directly**.

:::::WorkflowBlock
:::WorkflowBlockItem
Set the default time range and week start

In **Dashboard settings > Time options**:

- Week start: `Monday`
:::

:::WorkflowBlockItem
Open the dashboard JSON model

In **Dashboard settings > JSON model**, find the `timepicker` object. By default it looks like this:

```json
"timepicker": {}
```
:::

::::WorkflowBlockItem
Replace the `timepicker` object with the custom quick ranges

```json
"timepicker": {
  "quick_ranges": [
    { "display": "This week",    "from": "now/w",    "to": "now/w+1w"  },
    { "display": "Last week",    "from": "now-1w/w", "to": "now/w"     },
    { "display": "2 weeks ago",  "from": "now-2w/w", "to": "now-1w/w" },
    { "display": "3 weeks ago",  "from": "now-3w/w", "to": "now-2w/w" },
    { "display": "4 weeks ago",  "from": "now-4w/w", "to": "now-3w/w" }
  ]
}
```

Save the dashboard. The time picker dropdown will now show these five options instead of Grafana's default ranges, making it immediately clear to any user how to navigate between weeks.

:::hint{type="info"}
Adding `quick_ranges` **replaces** Grafana's built-in quick ranges entirely. If you want to keep any of the defaults (e.g. "Last 7 days"), add them explicitly to the list alongside the weekly options.
:::
::::
:::::
::::::

:::::ExpandableHeading
### Add a `Time series` visualisation: Total batches by day by line

This panel shows how many batches ran each day, with each series representing one recipe on one line.

::::WorkflowBlock
:::WorkflowBlockItem
Click :inlineImage[]{src="https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/EhqvjhkKs3ATxhlx2CuQp-20260325-092933.png" alt caption width="116" height="48"}  **>&#x20;**`Visualisation` and select Data source: `Factry Historian Datasource`
:::

:::WorkflowBlockItem
Configure the data source

- Tab: `Events`
- Query type: `Simple`
- Assets: `$mixer`
- Event types: `Mixing Batch`
- Properties: /
:::

:::WorkflowBlockItem
Add transformations

This is the most involved transformation pipeline in the dashboard. Each step is necessary:

1. `Format time`
   Format `StartTime` as `DD-MM-YYYY` (browser timezone). This strips the time component so events on the same day can be grouped together correctly in the next step.
2. `Group by`
   Group by `StartTime` and `AssetPath`, aggregate `EventUUID` as `count`. This gives a row per day per line with a batch count.
3. `Partition by values`
   Partition by `Recipe` and `AssetPath`. This splits the single table into one series per Recipe+Line combination, which is what the time series panel needs to draw separate lines.
4. `Convert field type`
   Convert `StartTime` from string back to time using format `DD-MM-YYYY`. The `Format time` step turned it into a string; this step turns it back into a proper timestamp so the time series panel can place it on the time axis correctly.
5. `Rename by regex`
   Regex: `(.*Line \d).*`, rename pattern: `$1`. This trims the asset path down to just the line name (e.g. `Faketory/Line 1/Mixer` becomes `Line 1`) to keep the legend readable.
:::

:::WorkflowBlockItem
Change visualisation to `Time series` and configure panel options

- Panel options
  - Title: `Total batches by day by line`
  - Transparent background: `Checked`
- Graph styles
  - Draw style: `Line`
  - Fill opacity: `0` (default)
  - Stacking: `Normal`
  - Decimals: `0` *(batch counts are whole numbers)*
- Legend
  - Mode: `Table`
  - Values: `Sum`
  - Placement: `Right`
  - Width: `350`
- Field overrides
  - Fields matching `/.*Line 2/`: set `Fill opacity` to `0` and `Color` to `#505050`
    *(This visually separates the two lines. Line 1 gets a filled area, Line 2 gets a plain dark line.)*
:::
::::
:::::

:::::ExpandableHeading
### Add a `Time series` visualisation: Total batches by day by recipe

This panel shows the same data but partitioned by recipe instead of by line, so the viewer can see which recipes drove throughput on any given day.

::::WorkflowBlock
:::WorkflowBlockItem
Click :inlineImage[]{src="https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/EhqvjhkKs3ATxhlx2CuQp-20260325-092933.png" alt caption width="116" height="48"} **>&#x20;**`Visualisation` and select Data source: `Factry Historian Datasource`

Use the same query as the previous panel: `$mixer`, event type `Mixing Batch`, property filter `Recipe IN $recipe`.
:::

:::WorkflowBlockItem
Add transformations

The pipeline is the same as the "by line" panel with two differences:

1. `Format time`: same as before.
2. `Group by`: Group by `StartTime` and `Recipe`, aggregate `Recipe` as `count`.
   *(Group by Recipe this time, not AssetPath.)*
3. `Sort by`: Sort by `Recipe` before partitioning to ensure a consistent series order.
4. `Partition by values`: Partition by `Recipe` and `AssetPath`.
5. `Convert field type`: same as before.
6. `Rename by regex` with regex `(.*Recipe \d).*` and rename pattern `$1`.
:::

:::WorkflowBlockItem
Change visualisation to `Time series` and configure panel options

- Panel options
  - Title: `Total batches by day by Recipe`
  - Transparent background: `Checked`
- Graph styles
  - Draw style: `Bars`
  - Bar width factor: `0.3`
  - Fill opacity: `40`
  - Stacking: `Normal`
- Legend
  - Mode: `Table`
  - Values: `Sum`
  - Placement: `Right`
  - Width: `350`
- Field overrides
  - Fields matching `/energy/`: set draw style to `Line`, unit to `kWh`, fill opacity to `0`
    *(A future overlay of energy data would automatically render as a line rather than a bar.)*
:::
::::
:::::

:::::ExpandableHeading
### Add a `Bar chart` visualisation: Avg energy per batch by recipe

This panel sits to the right of the two throughput panels and spans both rows. It shows the average energy consumed per batch, grouped by recipe, with one bar per line. This makes it easy to compare whether Line 1 and Line 2 are equally efficient for the same recipe.

::::WorkflowBlock
:::WorkflowBlockItem
Click :inlineImage[]{src="https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/EhqvjhkKs3ATxhlx2CuQp-20260325-092933.png" alt caption width="116" height="48"} **>&#x20;**`Visualisation` and select Data source: `Factry Historian Datasource`
:::

:::WorkflowBlockItem
Configure the data source

- Tab: `Events`
- Query type: `Simple`
- Assets: `$mixer`
- Event types: `Mixing Batch`
- Properties: `Total energy usage`, `Recipe`
:::

:::WorkflowBlockItem
Add transformations

1. `Group by`
   Group by `AssetPath` and `Recipe`, aggregate `Total energy usage` as `mean`.
2. `Organize fields`
   Rename `Total energy usage (mean)` to `Avg Energy Usage`.
3. `Sort by`
   Sort by `Recipe` for consistent column ordering.
4. `Grouping to matrix`
   Column field: `Recipe`, row field: `AssetPath`, value field: `Avg Energy Usage`.
   *(This pivots the data so each recipe becomes a column and each line becomes a row. This becomes the shape the bar chart needs to draw grouped bars.)*
5. `Sort by`
   Sort by the field `AssetPath\...` to ensure lines appear in a consistent order.
:::

:::WorkflowBlockItem
Change visualisation to `Bar chart` and configure panel options

- Panel options
  - Title: `Avg Energy per Batch by Recipe`
  - Transparent background: `Checked`
- Bar chart options
  - X field: `AssetPath`
  - Orientation: `Auto`
  - Bar width: `0.6`
  - Show value: `Auto`
  - Text size: `30`
- Legend
  - Visibility: `Unchecked` *(recipe names are already the bar group labels)*
- Field overrides
  Assign consistent colors by recipe number:
  - Fields matching `/.*1$/` → `#25cd93`
  - Fields matching `/.*2$/` → `#9977ff`
  - Fields matching `/.*3$/` → `#cd9b25`
:::
::::
:::::

:::::ExpandableHeading
### Add a `Pie chart` visualisation: Visual inspection results

This donut chart shows the split of `pass`, `fail` and `needs_review` outcomes for the visual inspection quality check. It is configured to **repeat per mixer**, so one donut automatically appears for each line.

::::WorkflowBlock
:::WorkflowBlockItem
Click :inlineImage[]{src="https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/EhqvjhkKs3ATxhlx2CuQp-20260325-092933.png" alt caption width="116" height="48"} **>&#x20;**`Visualisation` and select Data source: `Factry Historian Datasource`
:::

:::WorkflowBlockItem
Configure the data source

- Tab: `Events`
- Query type: `Simple`
- Assets: `$mixer`
- Event types: `Emptying step`
- Properties: `Visual inspection result`
:::

:::WorkflowBlockItem
Add transformations

1. `Filter by value`
   Exclude rows where `Visual inspection result` is null. Without this, batches where the field was not filled in would count as a third outcome and distort the percentages.
2. `Group by`
   Group by `Visual inspection result`, aggregate as `count`. This gives a row per outcome value with its count.
3. `Transpose`
   Pivots the result values into columns (`pass`, `fail`, `needs_review`) with their counts as values. The pie chart expects one column per slice.
:::

:::WorkflowBlockItem
Change visualisation to `Pie chart` and configure panel options

- Panel options
  - Title: `$mixer`
  - Transparent background: `Checked`
- Pie chart options
  - Pie type: `Donut`
  - Display labels: `Name`, `Percent`
  - Sort: `Desc`
- Field overrides
  Assign consistent colors:
  - Field `pass` → `#25cd93`
  - Field `fail` → `dark-red`
  - Field `needs_review` → `#cd9b25`
:::

:::WorkflowBlockItem
Configure panel repeat

In the panel options, under `Repeat options`:

- Repeat by variable: `mixer`
- Repeat direction: `Vertical`

This creates one donut per mixer value (i.e. one per line) stacked vertically, without needing to duplicate the panel.
:::
::::
:::::

::::::ExpandableHeading
### Add `Stat` visualisations: Color check and Clarity pass rates

These two stat panels show the pass rate (as a percentage) for the color check and clarity quality properties. Both use the same transformation pattern and are also configured to repeat per mixer.

:::::WorkflowBlock
:::WorkflowBlockItem
Click :inlineImage[]{src="https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/EhqvjhkKs3ATxhlx2CuQp-20260325-092933.png" alt caption width="116" height="48"} **>&#x20;**`Visualisation` and select Data source: `Factry Historian Datasource`

Configure for **Color check** first, then duplicate for Clarity.

- Tab: `Events`
- Query type: `Simple`
- Assets: `$mixer`
- Event types: `Emptying step`
- Properties: `Color check`
:::

::::WorkflowBlockItem
Add transformations

This pipeline computes `pass_count / total_count` to produce a percentage:

1. `Filter by value`
   Exclude rows where `Color check` is null.
2. `Group by`
   Group by `Color check`, aggregate as `count`. This gives one row per outcome value.
3. `Transpose`
   Pivots outcome values into columns (e.g. `normal`, `abnormal`) with counts as values.
4. `Calculate field`
   Leave options empty. This step adds a `Total` column by summing all existing value columns.
5. `Calculate field`
   Mode: `Binary operation`
   - Left: `normal`
   - Operator: `/`
   - Right: `Total`
   - Alias: `normal`
   - Replace all fields: `Checked`

:::Paragraph{indent="1"}
This divides the count of `normal` results by the total to produce a rate between 0 and 1.
:::
::::

:::WorkflowBlockItem
Change visualisation to `Stat` and configure panel options

- Panel options
  - Title: `$mixer - Color check pass rate`
  - Transparent background: `Checked`
- Value options
  - Fields: `/^normal$/`
  - Reduce: `Last (not null)`
- Standard options
  - Unit: `Percent (0–1)`
  - Min: `0`, Max: `1`
  - No value: `No data`
- Stat styles
  - Color mode: `None`
  - Graph mode: `Area`
:::

:::WorkflowBlockItem
Configure panel repeat

Same as the donut panel:

- Repeat by variable: `mixer`
- Repeat direction: `Vertical`
:::

:::WorkflowBlockItem
Duplicate for Clarity

Duplicate the panel and make two changes:

- Query property: `Clarity` instead of `Color check`
- Title: `$mixer - Clarity check pass rate`
- In the `Filter by value` transformation: change the field from `Color check` to `Clarity`
- In the binary `Calculate field` transformation: change both the left operand and alias from `normal` to `clear`
  *(The Clarity field uses&#x20;*`clear`*&#x20;as its passing value rather than&#x20;*`normal`*.)*
:::
:::::
::::::

:::::ExpandableHeading
### Add a `Table` visualisation: Failed quality checks

This full-width table at the bottom of the dashboard lists every emptying step event across both lines where the visual inspection result was not `pass`. It gives reviewers a direct list of batches that need follow-up, including which recipe the failed batch belonged to.

::::WorkflowBlock
:::WorkflowBlockItem
Click :inlineImage[]{src="https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/EhqvjhkKs3ATxhlx2CuQp-20260325-092933.png" alt caption width="116" height="48"} **>&#x20;**`Visualisation` and select Data source: `Factry Historian Datasource`
:::

:::WorkflowBlockItem
Configure the data source

- Tab: `Events`
- Query type: `Simple`
- Assets: `$mixer`
- Event types: `Emptying step`
- Properties: `Visual inspection result`, `Color check`, `Clarity`, `Sample taken`, `Sample ID`, `parent:Recipe`
- Include parent info: `Checked`
- Property filter: `Visual inspection result != pass`

Enabling `Include parent info` and adding `parent:Recipe` to the properties list pulls the recipe name from the parent Mixing Batch event into each emptying step row. This lets reviewers immediately see which recipe was involved without having to navigate to the batch detail.
:::

:::WorkflowBlockItem
Add transformations

1. `Organize fields`
   Hide all internal fields: `Asset`, `AssetUUID`, `Duration`, `EventType`, `EventTypeUUID`, `EventUUID`, `ParentEventUUID`, `StopTime`, and all `Parent_*` fields except `Parent_Recipe`. Rename `Parent_Recipe` to `Recipe`. Keep `AssetPath` and `StartTime` visible.
2. `Sort by`
   Field: `StartTime`, Reverse: `Checked`.
:::

:::WorkflowBlockItem
Change visualisation to `Table` and configure panel options

- Panel options
  - Title: `Failed Quality Checks`
- Field overrides
  - `Visual inspection result`:
    Cell type → `Pill`,
    map `fail` → `dark-red`, `needs_review` → `#cd9b25`
  - `Color check`:
    Cell type → `Pill`,
    map `normal` → `#25cd93`
  - `Clarity`:
    Cell type → `Pill`,
    map `clear` → `#25cd93`
:::
::::
:::::

## End result

The finished dashboard gives a complete weekly production summary in three sections. Use the quick ranges in the time picker (**Last week**, **2 weeks ago**, etc.) to step back through previous weeks. All variables are hidden. The only user-facing control is the time picker itself.

![](https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/6BPgzxXpgzmrX7D0xVaG5-20260330-141043.png)
