# Null values saving as zero to Historian

**URL:** <https://forum.inductiveautomation.com/t/null-values-saving-as-zero-to-historian/107468>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [June 17, 2025, 10:19am UTC](https://forum.inductiveautomation.com/t/null-values-saving-as-zero-to-historian/107468 "2025-06-17T10:19:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyle\_Latzke](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Kyle\_Latzke](https://forum.inductiveautomation.com/u/Kyle_Latzke)\
**Post date:** [June 17, 2025, 10:19am UTC](https://forum.inductiveautomation.com/t/null-values-saving-as-zero-to-historian/107468/1 "2025-06-17T10:19:56Z")

</div>

Hi, I have temperature values I'm recording. They should only record when the product hopper has product in them so I created an expression tag "Hopper 1 Temp", the expression looks like this:

```
if({[.]Hopper 1 Level} > 20, {[.]Hopper 1 Temp (Raw)}, null)

```

Which works as set up and shows a temperature when the hopper is over 20% and null when it's not. The problem is when null gets stored in historian, it gets stored as 0, so when we print end of day reports it shows the temperature as 0°F which is WAY out of specification. The temperature should be around -25°F to -35°F.

Maybe I'm going about it the wrong way?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 17, 2025, 2:21pm UTC](https://forum.inductiveautomation.com/t/null-values-saving-as-zero-to-historian/107468/2 "2025-06-17T14:21:04Z")

</div>

> [@Kyle\_Latzke](#):
>
> Maybe I'm going about it the wrong way?

The historian has no proper way to turn recording on and off based on another variable. It just isn't designed for such applications.

Use transaction groups in the SQL bridge module, or script your database history for the relevant tags.

---

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [June 17, 2025, 2:25pm UTC](https://forum.inductiveautomation.com/t/null-values-saving-as-zero-to-historian/107468/3 "2025-06-17T14:25:57Z")

</div>

Why use null in the first place? We just use a set negative value that is obviously faulted like -255.

---

<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:** [June 17, 2025, 2:32pm UTC](https://forum.inductiveautomation.com/t/null-values-saving-as-zero-to-historian/107468/4 "2025-06-17T14:32:06Z")

</div>

Use Absolute Zero!

---

<div class="post-metadata">

**Author:** ![Kyle\_Latzke](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Kyle\_Latzke](https://forum.inductiveautomation.com/u/Kyle_Latzke)\
**Post date:** [June 18, 2025, 10:52am UTC](https://forum.inductiveautomation.com/t/null-values-saving-as-zero-to-historian/107468/5 "2025-06-18T10:52:04Z")

</div>

I just ended up putting logic in the PLC to only update the address Ignition reads when the hopper is more than 20%. So if the last temp read while the hopper is 20% full is -30F it will not report another temperature until 30 seconds after the hopper refills to allow the RTD to adjust. The historian is set for OnChange so it doesn't record null or 0.

I was definitely overthinking this.
