Result
Understand how to create aggregated measures by using the icons in the "Flow Zone"
Tutorial steps
- Create a Daily Production Rating measure from the Hourly Production Rating measure
- Confirm that the aggregation/"roll-up" is working as expected
- Create daily aggregations of some of your other hourly measures
Aggregated Measures
At this stage, you have 4 tags:
- Production [kg/s],
- Production [ton/s],
- Production [ton/hr], and
- Temperature [°C]
and 4 measures
- Production [ton/hr],
- Production Efficiency [%],
- Production Rating [ton/hr], and
- Temperature [°C]
configured and deployed in your Flow System.
However, the measures only collect or calculate summary information for every hour. What if you wanted to summarize and report information for daily time periods?
Aggregated Measures are used to perform roll-up calculations of other measures in your Flow System. Let’s use an Aggregated Measure to roll up the hourly summary information into daily information.
Drag the "Production Rating (ton/hr)" measure from the Model View onto the "Daily" icon of the Flow Zone.
Flow will create a new daily "Production Rating (ton/hr)" measure. Notice the icon indicates the Interval (i.e. D = Daily) and the Measure Type (i.e. aggregated Δ).
General Properties
Double-click the new measure and notice the general properties have been copied from the hourly "Production Rating (tons/hr)" measure. Because this is a daily measure, change the "Unit" to "ton/day" as follows:
Retrieval Properties
Expand the "Retrieval" section. Notice that the "Retrieval" section is different for an Aggregated Measure.
- Measure – this is the measure that Flow will roll up (i.e. aggregate) to create new summary information. To change this measure, drag another measure from the Model View onto this setting.
- Aggregation – this is the aggregation method Flow will use to calculate the roll-up. Flow will default to "Sum", but available aggregation methods include "Average", "Minimum", "Maximum", "Range", "First", "Last" and "Counter".
- Interval – this is the "boundary" interval Flow will use to calculate the roll-up summary information. This property can be changed when cumulative roll-up calculations are required (e.g. "Week to Date", or "Month to Date", etc.)
- Scaling Factor - this is a multiplier applied to the result of the aggregation. This is useful when you need to present an aggregated value in a different Unit of Measure (e.g. if the hourly measure is in kWh, but the monthly aggregated value should be in MWh).
Rename the measure to "Daily"
Deploy the new measure and confirm that it is running and producing a value of 348.0 tons every day (from 14.5ton/hr * 24hr/day):
Now create daily Aggregated Measures for "Production (ton/day)" and "Temperature (˚C)". For the daily "Temperature (˚C)", make sure you change the "Aggregation" property to "Average", not "Sum". It would not make sense to sum the hourly average temperature summaries!