Today Builder (BDayBuilderBlock)

This block generates a trend that uses past historical data to represent “today.” The system converts timestamps by changing the date to today while preserving the time of day. When there are multiple values for the same timestamp, the rollup determines how to combine them. This block supports both trend and value requests.
For value requests the block processes a trend request using the block’s Time Range property and returns a single value. The block uses the function defined by the Rollup property defined in the request, else it uses the function defined by the block's Rollup property.
Figure 169.   Today Builder properties
Image

To view these properties, double-click the block on the Wire Sheet or the block name in the Nav tree.

Property Value Description
Out read-only value slot Outputs a trend or value calculated from the In value.
Trend In required value slot Links from the output of other logic blocks or data sources to supply trend data to the current logic block.
Rollup check box (if optional, and) drop-down list or ORD parameter (when configured in the data definition, defaults to First, when configured elsewhere, defaults to the value as defined in the Data Definition); rollup=option Configures the rollup function used by the block if the block’s Use Request Rollup property is set to false or the Rollup property is not explicitly configured in the request.

If rollup is not enabled in the binding/settings window, the rollup value configured in the Data Definition applies to all chart bindings, reports and tables.

And returns the logical “and” of Boolean values.

Avg returns the statistical mean, which is determined by calculating the sum of all values and dividing by the number of values.

Count returns the total number or quantity of values in a combination. If you request this value on a binding in a PX view, the system counts the number of values based on the properties defined by the data source block and the algorithm’s Property Sheet.

First returns the first value in the combination.

Last returns the last value in the combination.

Max returns the highest value in the combination.

Median returns the value in the middle of a sorted combination—the number that separates the higher half from the lower half.

Min returns the lowest value in the combination.

Mode returns the statistically most frequently occurring number in the combination.

Or returns the logical “or” of Boolean values.

Range returns the statistical difference between the largest and smallest values in the combination.

Sum adds together all values in the combination resulting in a single value.

Std Dev calculates the standard deviation of the values in the combination.

Load Factor calculates the average divided by peak (Max) value.

Time Range range of options (defaults to Previous 60 Days) Defines the time period over which to combine the data in a rollup.

This property is required for rollup requests (analyticRollup), trends (analyticTrend), and rollup bindings. It is optional elsewhere.

It is not used if the block’s Use Request Time Range property is true and the request specifies a time range.

Options range from From to All.

Use Request Rollup true (default) or false Determines the rollup function to use.

true causes the block to use the function defined by the incoming request. If the Rollup property is not defined in the request, the block uses the function defined by its Rollup property.

false causes the block to use the function defined by its Rollup property.

Use Request Time Range true (default) or false Determines the time range for rolling up data.

true causes the block to use the time range defined by the incoming request. Value requests always use the block’s Time Range property.

false causes the block to use the time range defined its Time Range property.

Example

This block is similar in function to using a combination of a Time Range Offset Block and a Timestamp Offset Block. The Today Builder Block always requests a time range of historical data and modifies the timestamps by changing the date to today while preserving the time of day. If the requested time range spans more than one day, the block rolls up the records with matching times of day.

For a trend request, the default interval is 15 minutes, which causes the algorithm to return the requested historical data with 15-minute interval timestamps that show today’s date. This block is most useful in an algorithm that compares today’s values vs. yesterday’s values, or today’s values vs. the values one week ago, where some historical data prior to today’s data can be compared against today’s data.

Figure 170.   Day Builder Block trend request algorithm
Image

This algorithm produces the following chart.

Figure 171.   Day Builder Block chart
Image

For a value request, the algorithm only returns a single value by rolling up the data from the requested time range using the configured rollup function.

Note that for a value request, the Today Builder Block uses the value of its Time Range property regardless of the value of its Use Request Time Range property because a value request does not include a Time Range. A Today Builder block may use the rollup function from the value request if the its Use Request Rollup property is true (the default setting).

Figure 172.   Day Builder Block value request algorithm
Image

The following screen capture shows the configuration of the numeric point.

Figure 173.   Numeric point configuration properties
Image

Processing with Use Request Rollup

When Use Request Rollup is false and Rollup is not configured, the block uses the rollup function defined in the applicable Data Definition. If there is no Data Definition, the block uses the default First function. When Use Request Rollup is false and Rollup property is configured, the block uses the Rollup property value. When Use Request Rollup is true, the block uses the rollup function defined in the request (Analytic Proxy Ext, Analytic Binding, etc.), unless the request does not specify the rollup function in which case the block uses the Algorithm’s Rollup property value.

The following table may help to determine when each value applies.

Data Definition Rollup Data Source Block Use Request Rollup Data Source Block Rollup Request Rollup Algorithm Rollup Actual Rollup Function
Unconfigured False Unconfigured Sum Max Defaults to First
Last False Unconfigured Sum Max Last
Last False Avg Sum Max Avg
Last True Avg Sum Max Sum
Last True Avg Unconfigured Max Max