Understanding Calculated Tags
Calculated Value Tags (CVTs) let you create new data feeds by applying mathematical calculations to one or more existing tags. This can be used to translate incoming raw sensor data into higher-order metrics for further analysis or report creation. Where a raw tag answers “What is this sensor reading right now?”, a CVT can answer “What does this mean for my operation?”
Once created, CVTs appear alongside other data tags in any tag selection dropdown throughout MyStacks.
Why calculated value tags matter
Sensors report raw values up to several times per second, at a volume that is hard to interpret and expensive to export. CVTs solve this by processing the latest data every 30 minutes and sending the resulting values over a new data feed, making useful synthesized data available for visualization and export. Some common scenarios where CVTs deliver immediate value:
- Analyzing long-term data histories: Processing weeks or months of second-by-second data quickly becomes unmanageable, even in tools like Excel. Use CVTs to reduce data volume by aggregating or decimating raw data at regular intervals, making trend analysis and summary reporting easier.
- Using signals as a proxy for machine behavior: Even simple productivity KPIs can require nuanced calculations. To track efficiency for example, if a machine runs 8 hours at 90% and 1 hour at 50%, simple averaging suggests a 70% efficiency. However, a time-weighted average will correctly reflect a much higher efficiency (85.5%) because the high-performance period lasted longer. Use CVTs to automate this and other calculations in your dashboard, ensuring that accurate performance data is always available for visualization and export.
- Counting events and accumulating totals: Raw moment-to-moment sensor readings don’t directly answer operational questions like “How many cycles ran on Line 2 this shift?” or “How many liters of water did we use today?” Use CVTs to count discrete events like button presses, or sum up a quantity such as readings from a flow meter each hour, and directly access real production totals from your dashboard.
- Reducing API calls: Because CVTs are calculated and stored incrementally, repeated use in dashboards and widgets draws on cached results rather than reprocessing raw data each time which is much more efficient and minimizes wait time.
Using CVTs in MyStacks
CVTs are configured in the Tag Management Tool, accessible from your Stack settings. Once inside Tag Management, select the source tag you want to run a calculation against and scroll to the Calculated Value property.

Here you can select from a list of preset options. Selecting one will allow you to enter any variables needed by the formula to complete the calculation. Each preset is explained in detail below:
Decimation by Minutes
Reduces data volume by sampling the tag at a regular interval you define. Instead of storing every incoming reading, the system captures one value per N minutes, producing a manageable representative time series for trend analysis or long-range data exports.
Configure this type using the following fields:
- Stack Name: The stack from which you will pull a data tag. This field defaults to the same stack that provides the source tag.
- Tag ID: The tag you want to decimate. Note that even if you have set a custom Name field, you will need to enter the unique ID at the top left corner of the property editor.
- Interval (minutes): How often to sample the tag. Enter any whole number of minutes
Time Weighted Mean
Calculates a weighted average that accounts for how long the tag held each value during a time window. This correctly represents tags that stay at one value for varying lengths of time before stepping to another, especially useful for state-based or step-change signals such as machine speed or power mode.
Configure this type using the following fields:
- Stack Name: The stack from which you will pull a data tag. This field defaults to the same stack that provides the source tag.
- Tag ID: The tag you want to decimate. Note that even if you have set a custom Name field, you will need to enter the unique ID at the top left corner of the property editor.
- Interval (minutes): What time window to use for averaging. Enter any whole number of minutes
Count
Compiles a count or accumulation of tag values over a defined time window. Three count types are available:
- Sample Count: Counts the number of times the tag reports any value. Use with binary inputs like buttons or digital state changes.
- Sum: Adds together the values received during the time window. Use with flow meters or other tags that report a quantity per sample.
- Cumulative Sum (Diff): Calculates the difference between the start and end value of the time window to show total change over time. Use with tags that increase continuously and never reset, such as a totalizing meter.
Configure this type using the following fields:
- Stack Name: The stack from which you will pull a data tag. This field defaults to the same stack that provides the source tag.
- Tag ID: The tag you want to decimate. Note that even if you have set a custom Name field, you will need to enter the unique ID at the top left corner of the property editor.
- Interval (minutes): What time window to use for counting. Enter any whole number of minutes
- Count type (ctype): Enter the count type you prefer: ‘sample’, ‘sum’, or ‘diff’
Creating Custom CVTs
CVTs are powered by a formula engine that works similarly to Excel. Each preset represents a common formula, and as the CVT library grows additional options will be added to the dropdown.
In most cases, Interstacks support will be available to add additional functions upon request. For teams with advanced requirements, a formula editor exists in the system and can be made available by your support engineer.
Editing existing Calculated Value Tags
CVTs are calculated once and stored. If you change the parameters of an existing CVT, or parameters of the source tag such as state thresholds, the new definitions will only apply to data that arrives after the change. Historical data will continue to reflect the old parameters, which can create inconsistencies in reports that cross over the date at which the change was made.
If it is critical to recalculate the entire historical record according to new parameters, contact Interstacks Support for assistance.
Need help?
If you’re unsure how calculated tags can help support your workflow or would like guidance getting started, contact your support engineer at info@interstacks.com for one-on-one assistance.