ValueSummary

Captures key values from a table into the frame.

Parameters

NameDefaultMeaning
methodavgavg, max, min or total
columnsRestrict the summary to only specific columns
prefixText to add before the name of each value
suffixText to add after the name of each value
whereA condition that must be met for the value to be analysed
splitBreak the summaries up based on a value

Special Rate Parameters

rateThe value is a rate, controlled by a column value
timebaseThe number of seconds per time unit

Description

This function performs simple analytic functions on some (or all) of the columns in a table and captures them.

This can be used to capture min, max, avg or total values across the different columns of your tables.

If you don't specify which columns the analytic should be performed on, it will be applied to all columns.

Example

If the frame contains the following table…

TimeSpeedTemperature
10:000100
10:1025100
10:2050100
10:3075100
10:40100100
{
   "type": "valuesummary",
    "method": "avg"
}

Your frame would then contain…

NameValue
Average Speed50
Average Temperature100

Working with Rates

If your values represent a rate (such as an amount of production per minute), you can use the two special parameters ('rate' and 'timebase') to change how the analytics are performed.

The first is rate, which should be the name of the column where the speed or flow rate of your process can be read.

The next is timebase, which lets specify the number of seconds that each 'rate' measurement represents. For example, this would be '60' if your rate measurement is in units-per-minute, or 3600 if it's in units-per-hour.

So - for example - if you have scale giving you weight per meter and a sensor giving you meters per minute, you could use the following configuration…

{
   "type": "valuesummary",
   "columns": ["Scale.Weight"],
   "rate": "Line.Speed",
   "multiplier": 60,
   "mode": "total"
}

…which would give you a “Total Scale.Weight” figure that contained the total weight of manufactured product.

Splitting Results

In some cases, you might want several different summary values.

TimeSpeedProduct
10:000Chocolate
10:1025Strawberry
10:2050Blueberry
10:3075Caramel
10:40100Bananna
{
   "type": "valuesummary",
    "method": "avg",
   "split": "Product"
}

Your frame would then contain…

NameValue
Average Chocolate Speed0
Average Strawberry Speed25
Average Blueberry Speed50
Average Caramel Speed75
Average Bananna Speed100