# Noob not getting the syntax for average of tag data

**URL:** <https://forum.inductiveautomation.com/t/noob-not-getting-the-syntax-for-average-of-tag-data/69287>\
**Category:** General Discussion\
**Tags:** scripting\
**Created:** [February 1, 2023, 3:58pm UTC](https://forum.inductiveautomation.com/t/noob-not-getting-the-syntax-for-average-of-tag-data/69287 "2023-02-01T15:58:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Blaschuk](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@Ben\_Blaschuk](https://forum.inductiveautomation.com/u/Ben_Blaschuk)\
**Post date:** [February 1, 2023, 3:58pm UTC](https://forum.inductiveautomation.com/t/noob-not-getting-the-syntax-for-average-of-tag-data/69287/1 "2023-02-01T15:58:44Z")

</div>

Issue: I want an LED display to output the average tag data of a given date range.  
Problem: I have tried and expression and scripting on the LED display and I cant get it to work. p.s. no more tables please 🙂  
Things tried:  
system.tag.queryTagCalculations(path='tag', calculation='Average',startDate='Custom property 1', endDate="Custom property 2')  
system.tag.queryTagHistory(paths='tag', ,startDate='Custom property 1', endDate='Custom property 2',aggra="Average")  
What am doing wrong?... assume I spelled everything correctly. 🙂

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 1, 2023, 4:29pm UTC](https://forum.inductiveautomation.com/t/noob-not-getting-the-syntax-for-average-of-tag-data/69287/2 "2023-02-01T16:29:26Z")

</div>

Can you show a screenshot of exactly what you're trying and where?  
You mention 'expression' and 'scripting' in your post, but both examples are using scripts. You're also not using valid syntax to pass in parameters, and `aggra="Average"` is meaningless, since that's not a supported parameter for the function.

---

<div class="post-metadata">

**Author:** ![Ben\_Blaschuk](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@Ben\_Blaschuk](https://forum.inductiveautomation.com/u/Ben_Blaschuk)\
**Post date:** [February 1, 2023, 4:50pm UTC](https://forum.inductiveautomation.com/t/noob-not-getting-the-syntax-for-average-of-tag-data/69287/3 "2023-02-01T16:50:13Z")

</div>

tried this in the Expression property for the LED display and the scripting...  
system.tag.queryTagCalculations(paths=[{[default]Hi Speed Nordson/Line Speed FPM 2}],calculations=["Average"],startDate=[{Root Container.startDate5AM}],endDate=[{Root Container.stopDate2PM}])

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 1, 2023, 9:37pm UTC](https://forum.inductiveautomation.com/t/noob-not-getting-the-syntax-for-average-of-tag-data/69287/4 "2023-02-01T21:37:36Z")

</div>

Closed on February 1, 2023, 9:37pm UTC


