Historical tag average

Is there any way to show the average (or other calculation) of a range historical data on a display, as shown in the following screenshot ?

thanks you!!
Sin título

Ta-da …err ¡Ya está!


1 Like

is there any way to put that function in the numeric label value ?

In this instance I think you may actually want system.tag.queryTagCalculations.

Either way the functions return a dataset, you can get the desired value from the dataset and put it into the label from what ever script you choose.

Something like this (assuming Vision):

if event.propertyName == 'some property':
	tagCalcs = system.tag.queryTagCalculations(paths = ['Your Tag Path'],calculations = ['Average'],rangeHours = 24)
	event.source.parent.parent.getComponent('Numeric Label').value = tagCalcs.getValueAt(0,0)

thanks you