# History not storing correctly

**URL:** <https://forum.inductiveautomation.com/t/history-not-storing-correctly/87729>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [March 22, 2024, 7:51am UTC](https://forum.inductiveautomation.com/t/history-not-storing-correctly/87729 "2024-03-22T07:51:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [March 22, 2024, 7:51am UTC](https://forum.inductiveautomation.com/t/history-not-storing-correctly/87729/1 "2024-03-22T07:51:50Z")

</div>

We are facing something strange in our historical data. We are storing our tag according to these settings:

 ![Screenshot 2024-03-22 at 08.35.00](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/242fe3047c46e8e58fb05d9046ac3d2ae608bf75.png)

Max time between samples is 1 hour, so when the values doe not change, it's normal to see a record in the database every hour.  
When looking at the data as stored, we see something odd. As you can see in the following screenshots, there is exactly 1 hour between the two storing moments, but the value is changed.

![Screenshot 2024-03-22 at 08.36.53](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/c/fcad8adbc7e707d3ddb6806256f384ff84daaf8a.png)

![Screenshot 2024-03-22 at 08.37.10](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/8/f8dba3da7280abcce8c4089a01bc89077d8a54a5.png)

It's highly unlikely that our operators changed the setpoint right at the exact timestamp that there is an auto-storing of the tag, so in my eyes this looks like a bug.

In this test we use a history splitter, splitting to both Postgres and to Influx, and we see the data in both databases at the same timestamps.

Are we overlooking something? Or should we take this up with support?

Thanks for looking along.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [March 22, 2024, 8:19am UTC](https://forum.inductiveautomation.com/t/history-not-storing-correctly/87729/2 "2024-03-22T08:19:50Z")

</div>

Is the data in your screenshot taken directly from the sqlth tables, or did you use some kind of history binding to display it ?

If the latter, it might not be the actual data as it is stored.

---

<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:** [March 22, 2024, 8:20am UTC](https://forum.inductiveautomation.com/t/history-not-storing-correctly/87729/3 "2024-03-22T08:20:31Z")

</div>

This is, I suspect, a problem with [analog compression](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/tag-historian/configuring-tag-history#deadband-and-analog-compression) in the historian.

The [tag history Auto](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/tag-historian/configuring-tag-history#auto) section says,

> The setting will automatically pick either Analog or Discrete, based on the data type of the tag.
> 
> - If the data type of the tag is set to a **float or double, then Auto will use the Analog Style**.
> - If the data type of the tag is any other type, then the Discrete style will be used.

Your screenshot doesn't show what datatype your tag is, but try setting Deadband Style to Discreet.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [March 22, 2024, 8:20am UTC](https://forum.inductiveautomation.com/t/history-not-storing-correctly/87729/4 "2024-03-22T08:20:44Z")

</div>

It's in Ignition, but I have also checked it directly in the database, it's the same.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [March 22, 2024, 8:22am UTC](https://forum.inductiveautomation.com/t/history-not-storing-correctly/87729/5 "2024-03-22T08:22:30Z")

</div>

It's a Float. Thanks, I've changed it to Discreet. I will see what that changes.
