Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

Using SliceBy

  • Last UpdatedMar 10, 2025
  • 1 minute read

You can use a SliceBy parameter with an Analog Summary query to retrieve average values by batch within a specific time range.

For example, this is a query for an analog summary of the SysTimeMin tag, sliced by the SysTimeHour tag for a certain time range:

{

"FQN":["SysTimeMin"],

"StartDateTime":"2018-02-28T18:30:33.966Z",

"EndDateTime":"2018-02-28T21:00:00Z",

"SliceBy":["SysTimeHour"]

}

If the first or last batch is only partially complete, Historian will provide results as follows:

  • If the first batch is only a partial set, the average is calculated for the amount of time represented by that batch. For example, suppose you have a tag that last changed at 7:50 a.m. and the query includes a start time of 8:00 a.m. The average includes values beginning at 7:50 a.m.

    To include a partial first batch, use “>=” with your StartDateTime parameter. For example:

    "StartDateTime">"2018-02-28T08:00:00.000Z"

    To exclude a partial first batch, use “>” with StartDateTime. For example:

    "StartDateTime">"2018-02-28T08:00:00.000Z"

  • If the last batch is only a partial set, the wwResolution for the last batch will be NULL. For example, if the SliceBy query is for 8a.m. to noon, but the last batch is still in progress, the result will include “wwResolution=NULL”.

Batches can be organized using GroupBy. For example, you could use GroupBy to organize data by tag state.

Related Links
TitleResults for “How to create a CRG?”Also Available in