# Tag Averaging and variance values for Individual tags

**URL:** <https://forum.inductiveautomation.com/t/tag-averaging-and-variance-values-for-individual-tags/21680>\
**Category:** Ignition\
**Created:** [January 4, 2019, 2:26am UTC](https://forum.inductiveautomation.com/t/tag-averaging-and-variance-values-for-individual-tags/21680 "2019-01-04T02:26:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwwalls](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@bwwalls](https://forum.inductiveautomation.com/u/bwwalls)\
**Post date:** [January 4, 2019, 2:26am UTC](https://forum.inductiveautomation.com/t/tag-averaging-and-variance-values-for-individual-tags/21680/1 "2019-01-04T02:26:59Z")

</div>

What would be the best method to provide a 7 day average of the below listed tag path within a UDT?

{[.]…/Flow Yesterday/value}

Would it be best to do this with an expression tag and if so what would be the best expression to use??

Any suggestions?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [January 4, 2019, 4:09am UTC](https://forum.inductiveautomation.com/t/tag-averaging-and-variance-values-for-individual-tags/21680/2 "2019-01-04T04:09:28Z")

</div>

Where are values for the last seven days stored? Do you have tags like flow yesterday, flow 2 days ago, etc? Or something else?

---

<div class="post-metadata">

**Author:** ![bwwalls](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@bwwalls](https://forum.inductiveautomation.com/u/bwwalls)\
**Post date:** [January 4, 2019, 4:29am UTC](https://forum.inductiveautomation.com/t/tag-averaging-and-variance-values-for-individual-tags/21680/3 "2019-01-04T04:29:35Z")

</div>

Thank you for the reply! No we do not have multiple day tags, only one tag for Flow Yesterday with historical archiving.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [January 4, 2019, 6:18am UTC](https://forum.inductiveautomation.com/t/tag-averaging-and-variance-values-for-individual-tags/21680/4 "2019-01-04T06:18:41Z")

</div>

If you’re using Tag Historian to store history, consider [system.tag.queryTagCalculations](https://docs.inductiveautomation.com/display/DOC79/system.tag.queryTagCalculations). If you’re using SQL Bridge and transaction groups to store history, a [query tag](https://docs.inductiveautomation.com/display/DOC79/Types+of+Tags#TypesofTags-SQLQueryTags) should do the job.
