# Tag History Binding doesn't match system.tag.queryTagHistory

**URL:** <https://forum.inductiveautomation.com/t/tag-history-binding-doesnt-match-system-tag-querytaghistory/84980>\
**Category:** Ignition\
**Created:** [January 30, 2024, 9:11pm UTC](https://forum.inductiveautomation.com/t/tag-history-binding-doesnt-match-system-tag-querytaghistory/84980 "2024-01-30T21:11:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paulo\_Custodio](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulo_custodio/32/56599_2.png) [@Paulo\_Custodio](https://forum.inductiveautomation.com/u/Paulo_Custodio)\
**Post date:** [January 30, 2024, 9:11pm UTC](https://forum.inductiveautomation.com/t/tag-history-binding-doesnt-match-system-tag-querytaghistory/84980/1 "2024-01-30T21:11:40Z")

</div>

I'm writing a script using the system.tag.queryTagHistory function that replicates the Tag History binding.

However, the returned values don't match. the system.tag.queryTagHistory is providing 300+ rows than the Tag History Binding, even though they have the same tag path and timeframe.

I could use some help on this to make sure that they'll match. Below are some pictures to illustrate my problem. Thank you in advance!

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/4093ff197117cea7c94703ceede8e4713743d9b6.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/6750d032644a8f61cf852ea48bca2dfd6d02244b.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/e/ce2cf8bf166d0e5ee416bd3888a9bfae11291a0e.png)

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [January 30, 2024, 9:19pm UTC](https://forum.inductiveautomation.com/t/tag-history-binding-doesnt-match-system-tag-querytaghistory/84980/2 "2024-01-30T21:19:45Z")

</div>

It looks like your one query is returning results without interpolation and the other is returning with an aggregate. I only glanced at this so I might have missed something.

search the documentation link for "Raw Data Queries"

Documentation  
[https://docs.inductiveautomation.com/display/DOC81/Configuring+Tag+History](https://docs.inductiveautomation.com/display/DOC81/Configuring+Tag+History)

---

<div class="post-metadata">

**Author:** ![Paulo\_Custodio](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulo_custodio/32/56599_2.png) [@Paulo\_Custodio](https://forum.inductiveautomation.com/u/Paulo_Custodio)\
**Post date:** [January 30, 2024, 9:37pm UTC](https://forum.inductiveautomation.com/t/tag-history-binding-doesnt-match-system-tag-querytaghistory/84980/3 "2024-01-30T21:37:30Z")

</div>

I added the returnSize and removed the interpolation, but it still didn't work.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d00214a9feac3613ca1b0d8048b30b42c9d9b9b4.png)

---

<div class="post-metadata">

**Author:** ![Paulo\_Custodio](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulo_custodio/32/56599_2.png) [@Paulo\_Custodio](https://forum.inductiveautomation.com/u/Paulo_Custodio)\
**Post date:** [January 30, 2024, 10:04pm UTC](https://forum.inductiveautomation.com/t/tag-history-binding-doesnt-match-system-tag-querytaghistory/84980/4 "2024-01-30T22:04:34Z")

</div>

I found the problem. It was on my time range.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [January 31, 2024, 1:02pm UTC](https://forum.inductiveautomation.com/t/tag-history-binding-doesnt-match-system-tag-querytaghistory/84980/5 "2024-01-31T13:02:20Z")

</div>

Excellent. I was going to suggest that and I was going to look it over a little more thoroughly.

Glad you got it.
