Skip to Content
DashboardsData & Queries

Data & Queries

UpBlue has no query language to learn. A panel gets its data from a pipeline: a list of steps, executed from top to bottom. The first step gets data, every following step changes it: calculate, filter, compare. You see the result live while building.

Think of the result as a table: one time column and a value column per tag. Every step works on that table.

Data pipeline

There are two datasources:

  • UpBlue Historian — your measurement data (time series).
  • Operations — your production runs and events. Read more about operations.

Get Data

Every pipeline starts with a Get Data step. It answers three questions:

Which tags?

Search tags by name, or filter on labels: for example everything with Cell = Line1 and tag name starting with temp. Label filters make dashboards that automatically include new machines: add a sensor with the right labels and it appears in the chart.

Filters support: equals (==), not equals (!=), matching a pattern (=~) and not matching (!~).

Summarized how?

Raw data has too many points to draw. The time range is divided in buckets (for example one per hour) and each bucket is summarized with an aggregation:

AggregationWhat you getUse for
AverageThe plain average of the values in the bucket.Evenly spaced measurements.
Time-weighted averageThe average, weighted by how long each value was valid.The right average for most machine data. With deduplication, values are not evenly spaced — a value that lasted 50 minutes should count more than one that lasted 10 seconds.
Min / MaxThe lowest / highest value.Peaks and dips, for example maximum temperature.
SumAll values added up.Values that are amounts by themselves.
CountThe number of datapoints.Checking data delivery.
First / LastThe first / last value in the bucket.Status values, meter readings.
DeltaLast minus first value.The change within the bucket.
IncreaseHow much a counter increased.Production counters and energy meters. Handles counter resets correctly.

In which buckets?

  • Automatic — bucket size fits the time range of the dashboard. The default.
  • Fixed — for example 1 hour: one value per hour, for “production per hour” bar charts.
  • One bucket — the whole time range as a single value, for stat panels: “production this week”.
  • No bucket — the raw datapoints, for detailed analysis over short ranges.

Gap filling

A bucket without datapoints is a gap. With deduplication this is normal: no datapoints just means the value did not change. Choose how gaps are filled:

  • Previous — repeat the last known value. Right for status and deduplicated values.
  • Linear — draw a line between the surrounding values. For smooth signals.
  • Zero — fill with 0. For production counts: no datapoints means nothing produced.
  • Off — leave the gap open.

Pipeline steps

After Get Data, add steps as needed. Steps refer to the value columns by name: $speed, $counter_line1.

Math

Calculate with the columns using an expression builder: $energy / $production for energy per product, $speed / 500 * 100 for speed as a percentage of the maximum. The special variable all applies the expression to every column, and days_in_bucket contains the bucket length in days.

Compare

If/then logic: IF $speed >= 10 THEN 1 ELSE 0 turns a speed into a running signal. A bare comparison like $actual > $target gives 1 or 0. The result becomes a new column.

Time Bucket

Re-summarize the result into other buckets, for example first calculate per hour, then average the hours per day.

Shift Time

Move a query in time, for example -1w: this week’s production next to last week’s, in the same chart. The classic “are we doing better than last week?” panel.

Fill Gaps

Fill empty spots in the result with the previous value, a fixed value or an interpolation. Same options as gap filling in Get Data, but as a separate step for calculated columns.

Delete / Delete All Except

Remove columns you only needed for a calculation. For example: get speed and status, compute $speed * $status, then delete the originals so only the result is shown.

The Operations datasource

The Operations datasource returns your production runs as rows: start, end, duration and their metadata (order number, customer, article) plus the aggregate rule results, for example the average speed per run.

Steps for operations:

  • Add column — add a calculated column.
  • Filter column — only keep runs matching a condition, for example one article.
  • Remove columns — hide what you don’t need.

Show the result in a Table panel for a production run overview, or combine it with time-series data.

Last updated on