# Aggregating Historian Tag Data For Reporting

**URL:** <https://forum.inductiveautomation.com/t/aggregating-historian-tag-data-for-reporting/18584>\
**Category:** Ignition\
**Tags:** ignition79, database\
**Created:** [June 22, 2018, 6:31pm UTC](https://forum.inductiveautomation.com/t/aggregating-historian-tag-data-for-reporting/18584 "2018-06-22T18:31:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt.wright](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@matt.wright](https://forum.inductiveautomation.com/u/matt.wright)\
**Post date:** [June 22, 2018, 6:31pm UTC](https://forum.inductiveautomation.com/t/aggregating-historian-tag-data-for-reporting/18584/1 "2018-06-22T18:31:23Z")

</div>

I’ve got a historian tag logging a value in which I need to aggregate and do some further reporting.

The tag logs a value other then 0 for 8 hour cycles, during that 8 hours I want to take the AVG of 60 second intervals and log this ending with ~480 values. I’m then going to do something else with these values for a report.

Where is the best place to put something like is? I initially thought somewhere in the Global Tag space and track the tag start/stop condition and get the average of all the values that come in and save it in a custom table but I’d like to follow an approach more where I’m using the historian table without the need of manually typing in the start/stop time.
