# Displaying historical tag information in numeric label

**URL:** <https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [September 17, 2025, 2:03pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713 "2025-09-17T14:03:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbailey](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@kbailey](https://forum.inductiveautomation.com/u/kbailey)\
**Post date:** [September 17, 2025, 2:03pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/1 "2025-09-17T14:03:29Z")

</div>

Good evening all

I’m very new to Ignition. I am converting a RSview32 application to Ignition. I am trying to display a tag’s history on the display as a numeric label. I need to do this for 36 total times to basically build a 3-hour historical display on the screen. I also need to do an average of these values and display it. I want to have the displays basically update each time the data is updated by the tag history period. I know the tables are the easiest way to display data this way, but I want to recreate the old display as it is what they are used to seeing. I can definitely do this in the PLC, but I figured since Ignition is building the database for me I should be able to read it easily.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [September 17, 2025, 2:04pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/2 "2025-09-17T14:04:43Z")

</div>

Vision or perspective? And what version?

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [September 17, 2025, 2:16pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/3 "2025-09-17T14:16:28Z")

</div>

You can easily pull this data with the historian in the exact format you want. If you don’t mind it being displayed in a table, that will be the easiest way to display the 3 hour historical values in 5 minute intervals. The average would be displayed separately. If you don’t want the 5 minute intervals in a table, then it will be more work but still possible.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [September 17, 2025, 2:19pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/4 "2025-09-17T14:19:23Z")

</div>

My thoughts were similar. However if Vision, then use a template repeater to emulate the labels from the dataset created.nif perspective use a flex repeater.

I'd run a gateway timer script to pull the data and push it into a dataset tag that the \*repeater would be bound to and viola data.

---

<div class="post-metadata">

**Author:** ![kbailey](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@kbailey](https://forum.inductiveautomation.com/u/kbailey)\
**Post date:** [September 17, 2025, 5:57pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/5 "2025-09-17T17:57:40Z")

</div>

We are running Ignition 8.1 and vision 11.1

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [September 17, 2025, 6:14pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/6 "2025-09-17T18:14:27Z")

</div>

Either @michael.flagler or my suggestion is viable in that environment.

Do you have a specific part that you are stuck on?

---

<div class="post-metadata">

**Author:** ![kbailey](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@kbailey](https://forum.inductiveautomation.com/u/kbailey)\
**Post date:** [October 13, 2025, 8:50pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/7 "2025-10-13T20:50:15Z")

</div>

Good evening all

Sorry to get back late I got stuck on a 2 week install and got pulled in one of my 45 other directions. I did figure out how to get a data table attached to a numeric display and do an average from that data. This will work for display purposes no problem. Ideally, I would like to get that average value that is bound in the numeric display property tied to a tag that I can reference in other parts of the project. I think it should be a tag history query with simple average aggregation. I have tried the manual for that function, but I am definitely having a syntax problem. SQL and Python are very new to me and training from work is non-existent to be honest.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [October 13, 2025, 10:19pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/8 "2025-10-13T22:19:22Z")

</div>

Post the code, show us what you are trying and we can help.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 13, 2025, 10:20pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/9 "2025-10-13T22:20:08Z")

</div>

Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![kbailey](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@kbailey](https://forum.inductiveautomation.com/u/kbailey)\
**Post date:** [October 14, 2025, 12:36pm UTC](https://forum.inductiveautomation.com/t/displaying-historical-tag-information-in-numeric-label/110713/10 "2025-10-14T12:36:16Z")

</div>

Based in the online manual and sample code I wanted to do the following to grab a rolling 3 hour dataset from the historian to store in a tag as a dataset. I also want to grab a simple average of the same data as a separate tag as well. My understanding is if I add an aggregationmode=simpleAverage modifier below I should get a simple average of the last 36 data points in this dataset.

`endTime = system.date.now()`  
`startTime = system.date.addMinutes(endTime, -180)`  
`dataset = system.tag.queryTagHistory(paths=['Oxidizer_Combustion_chamber_temp'], startDate=startTime, endDate=endTime, returnSize=0, returnFormat='Wide')`
