Tag Averaging and variance values for Individual tags

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.

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

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

If you’re using Tag Historian to store history, consider system.tag.queryTagCalculations. If you’re using SQL Bridge and transaction groups to store history, a query tag should do the job.