Customer Knowledge Base
Breadcrumbs

Niagara PRO TIPS: History Rollup (Part 2)

image-20260129-155517.png

Series Transforms and Niagara Analytics

Video Tutorial: Niagara PRO TIPS: History Rollup (Part 2) - Series Transforms and Niagara Analytics

NOTE:
If you want to watch the video while following along with the text notes, then right click and open the video in a new split screen window and the video should appear on the right of the notes so that you can follow along.


Overview

This guide covers Part 2 of history rollup in Niagara 4, focusing on series transform graphs and Niagara Analytics for data aggregation. Part 1 covered BQL history rollup functions and web chart sampling.


Method 6: Using Series Transform Graphs

What are Series Transforms?

Series transform graphs allow you to process and aggregate historical data using a visual node-based workflow. They use the Series Transform Palette which includes:

  • Transform graph

  • History source nodes

  • Various processing nodes

  • Terminal nodes


Basic Series Transform Setup

Step 1: Create a Series Transform Graph

  1. Add a series transform graph to your station

  2. Open the Series Transform Palette

Step 2: Add History Source Node

  1. Drag a history source node into the graph

  2. Configure the history source:

    • Point to your history (e.g., "main kW history")

    • Set the time range (e.g., "last week")

Step 3: Add Rollup Node

  1. Add a rollup node to the graph

  2. Link the history source node to the rollup node

Step 4: Configure the Rollup Node Schema

Define Schema Items:

  1. Click the play button to add all available schemas automatically

  2. Or click the plus button to add individual schema items

Schema Configuration:

  • Enter schema names (e.g., Min, Average, Max) - use Capital letters

  • Select functions: min, max, average, or sum

  • Choose which data inputs to aggregate

Set Rollup Interval:

  • Select from predefined periods: daily, hourly, monthly, etc.

  • Or choose Custom to enter a specific interval (e.g., 3 hours, 6 hours)

Step 5: Add Terminal Node

  1. Add a terminal node to the graph

  2. Link the rollup node to the terminal node

  3. View the terminal node to see the resulting schema:

    • timestamp

    • Custom schema names (e.g., Min, Average, Max)

Step 6: Resolve the Graph

  • Right-click on the graph

  • Choose "Resolve Graph" to execute and view results


Displaying Series Transform Data

Option A: Legacy Chart (Drag and Drop)

Step 1: Add to PX View

  1. Drag the series transform graph onto a PX view

  2. Use the Make Widget Wizard

  3. Choose "Display a chart"

Result:

  • Creates a chart pane with a bar chart

  • Automatically binds to the transform graph

  • Sets up all axes automatically

Option B: Collection Table

Step 1: Add to PX View

  1. Drag the series transform graph onto a PX view

  2. Use the Make Widget Wizard

  3. Choose "Collection Table"

Result:

  • Creates a table widget

  • Displays data in tabular format (similar to bound table with BQL)

  • Uses a workbench view binding to the series transform graph


Using Series Transforms with Web Charts

Understanding Web Chart Schema Requirements

Web charts expect specific schema column names:

  • timestamp (lowercase 't')

  • value (lowercase 'v')

⚠️ Limitation: Web charts won't automatically recognize custom schema names like Min, Average, or Max from your terminal node.

Solution: Create Individual Series Transforms

Step 1: Create Separate Transform for Each Function

For Min values:

  1. Create a series transform graph

  2. Add history source node → rollup node → terminal node

  3. In the rollup node schema:

    • Name: value (lowercase)

    • Function: min

  4. Terminal node will show: timestamp and value

For Average values:

  1. Create another series transform graph

  2. Same structure as above

  3. In the rollup node schema:

    • Name: value (lowercase)

    • Function: average

For Max values:

  1. Create another series transform graph

  2. Same structure as above

  3. In the rollup node schema:

    • Name: value (lowercase)

    • Function: max

Step 2: Configure PX View with Web Chart

  1. Add a web chart to your PX view

  2. Embed in a dashboard pane for easier configuration

  3. Add multiple WB view bindings pointing to each individual series transform:

    • Binding 1 → Min transform

    • Binding 2 → Average transform

    • Binding 3 → Max transform

Result:

  • Displays min, max, and average values on the same web chart

  • Each binding provides a separate data series

  • Can configure chart type (bar, line) and time range in dashboard


Why This Approach?

Web Chart Limitation:
When you have multiple trends on a web chart, the sampling tab's aggregation function applies to all series in the chart.

Series Transform Solution:

  • Aggregate data outside the scope of the web chart

  • Use series transforms to pre-process data

  • Display results using web chart with embedded series transforms

  • Allows different aggregate functions for different series from the same source


Method 7: Using Niagara Analytics

Prerequisites

Step 1: Enable Analytics Service

  • Add the analytics service to your station

Step 2: Configure Data Point

Set up a data point that maps to your history with proper tags:

  • end:history tag (marks it as a history)

  • a:a marker tag (enables use in analytics)

  • hs:power tag (or relevant equipment tag)


Analytics Chart Setup

Step 1: Access Analytics Palette

  1. Open the Analytics palette

  2. Navigate to available chart types

  3. Select Analytic Web Chart

Step 2: Add Chart to PX View

  1. Drag the analytic web chart to your PX view

  2. Embed in a dashboard pane to persist configuration properties

Step 3: Configure Chart Settings

Add Trends (Bindings):

Binding 1 - Minimum Values:

  • Tag: hs:power (or your data tag)

  • Scope: Specify where to search for the point

  • Rollup interval: day

  • Aggregate function: min

Binding 2 - Average Values:

  • Tag: hs:power

  • Scope: Same as above

  • Rollup interval: day

  • Aggregate function: average

Binding 3 - Maximum Values:

  • Tag: hs:power

  • Scope: Same as above

  • Rollup interval: day

  • Aggregate function: max

Result:

  • One data source, three bindings

  • Each binding specifies a different aggregate function

  • All displayed on the same analytic chart


Analytics Table Setup

Step 1: Access Analytics Palette

  1. Open the Analytics palette

  2. Navigate to Tables subfolder

  3. Select Web Table

Step 2: Configure Table Bindings

Same as the chart - add three bindings:

  • Binding 1: hs:power → daily → min

  • Binding 2: hs:power → daily → average

  • Binding 3: hs:power → daily → max

Step 3: Set Node Scope

Point the bindings to a node in the station where the system can find hs:power readings.


Advanced Analytics Feature: Multi-Source Aggregation

Powerful Capability:
If analytics finds multiple sources with the same tag (e.g., multiple hs:power points) in the specified scope, it will:

  • Aggregate values from all sources

  • Calculate min, max, and average from individual sources

  • Optionally sum values together for collective readings

Use Case Example:
Create a virtual meter for an entire building by aggregating power readings from multiple floors or zones.


Summary: All Methods for History Rollup

Method Comparison

Method

Best For

Complexity

Flexibility

1. Legacy Chart Builder

Quick visualization

Simple

Low

2. BQL History Rollup

Custom queries, tables

Medium

High

3. BQL Bound Tables

Displaying data in tables

Medium

High

4. Chart Bindings

Custom chart configurations

Medium

High

5. Web Chart Sampling

Simple auto-aggregation

Simple

Low

6. Series Transforms

Complex processing workflows

High

Very High

7. Niagara Analytics

Multi-source aggregation

Medium

High


Key Techniques Recap

From Part 1:

✅ Legacy chart builder with rollup functions
✅ BQL queries with history rollup functions
✅ Understanding history schema (timestamp, count, min, max, average, sum)
✅ Web chart automatic and manual sampling
✅ BQL time range syntax (floating and fixed periods)

From Part 2:

✅ Series transform graphs with rollup nodes
✅ Creating individual series transforms for web charts
✅ Using collection tables with series transforms
✅ Niagara Analytics charts and tables
✅ Multi-source data aggregation with analytics
✅ Virtual metering with analytics


Best Practices

When to Use Each Method:

Use Legacy Chart Builder when:

  • You need a quick visualization

  • Simple rollup requirements

  • One aggregate function is sufficient

Use BQL History Rollup when:

  • You need programmatic access to data

  • Building custom queries

  • Multiple aggregate functions needed from one query

Use Series Transforms when:

  • Complex data processing workflows required

  • Need to pre-process data before visualization

  • Want to use web charts with multiple aggregate functions

  • Building reusable data processing pipelines

Use Niagara Analytics when:

  • Working with multiple data sources

  • Need to aggregate across equipment

  • Building virtual meters

  • Want standardized analytics interface

  • Need to sum values from multiple sources


Important Reminders

Schema Considerations:

  • Series Transforms: Use capital letters for custom schema names (e.g., Min, Average, Max)

  • Web Charts: Require lowercase timestamp and value schema

  • BQL Results: Use camelCase (e.g., endTimestamp, timestamp, average)

Flexibility Tips:

  • Series transforms provide the most flexible data processing

  • Multiple approaches can be combined in the same project

  • Choose the method that best fits your specific requirements

  • Consider maintainability and ease of use for end users


Complete Workflow Example

Scenario: Display daily min, max, and average power consumption

Option 1 - BQL Approach:

  1. Create BQL query with history rollup function

  2. Use bound table or chart binding

  3. Extract min, max, average from schema

Option 2 - Series Transform Approach:

  1. Create three series transform graphs (one for min, one for max, one for average)

  2. Each uses value as schema name for web chart compatibility

  3. Add all three as WB view bindings to a web chart

Option 3 - Analytics Approach:

  1. Tag your history point with hs:power and a:a

  2. Create analytic web chart

  3. Add three bindings to same hs:power tag

  4. Specify min, max, average aggregate functions


Resources

Documentation:

  • Niagara 4 Series Transform documentation

  • Niagara Analytics guide

  • BQL reference guide

Related Topics:

  • Data visualization best practices

  • Performance optimization for historical queries

  • Custom analytics development


Presenter: James Johnson
Series:Niagara PRO TIPS
Part:2 of 2

YouTube: http://www.youtube.com/@TridiumInc


Quick Reference

Series Transform Rollup Node

History Source → Rollup Node → Terminal Node

Rollup Node Configuration:
- Schema Name: [Custom name or "value"]
- Function: min | max | average | sum
- Interval: daily | hourly | custom

Analytics Binding Configuration

Tag: hs:power (or relevant tag)
Scope: /Station/Drivers/... (search location)
Rollup: day | hour | month
Function: min | max | average | sum

Web Chart Schema Requirement

Required Schema:
- timestamp (lowercase)
- value (lowercase)