# \[Bug?\]: system.tag.queryTagHistory data issue

**URL:** <https://forum.inductiveautomation.com/t/bug-system-tag-querytaghistory-data-issue/64872>\
**Category:** Ignition\
**Created:** [October 5, 2022, 11:57pm UTC](https://forum.inductiveautomation.com/t/bug-system-tag-querytaghistory-data-issue/64872 "2022-10-05T23:57:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 9, 2022, 12:43am UTC](https://forum.inductiveautomation.com/t/bug-system-tag-querytaghistory-data-issue/64872/2 "2022-10-09T00:43:16Z")

</div>

I was able to reproduce your result using power tables, and it really does seem like a bug. When I use `system.tag.queryTagHistory` with a `returnSize` parameter of anything other than the default -1, my resultant columns are misaligned by 1 value:

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

In the above example, the table on the left has a return size of 10, and the table on the right has the default return size.

Query 1 code:  
`system.tag.queryTagHistory(paths=[path1], startDate=startTime, endDate=endTime, returnSize=10, aggregationMode="LastValue", returnFormat='Wide', noInterpolation=True)`

Query 2 code:  
`system.tag.queryTagHistory(paths=[path1], startDate=startTime, endDate=endTime, returnSize=-1, aggregationMode="LastValue", returnFormat='Wide', noInterpolation=True)`

---

_[View the full topic](https://forum.inductiveautomation.com/t/bug-system-tag-querytaghistory-data-issue/64872)._
