# Tag Historian Expression Binding issues

**URL:** <https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [September 29, 2026, 4:57pm UTC](https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249 "2026-09-29T16:57:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [September 29, 2026, 4:57pm UTC](https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249/1 "2026-09-29T16:57:43Z")

</div>

Hi all,  
I would like to pull tag historical data into a Perspective table. I have a list of tag path maps for the historical expression as seen in this pic:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/d/6de70c0afd3b2b63a374c615dcabe9aaefc31236.png)  
And in the second pic, showing the binding:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/3/6359fe67ebca216fe7f9abb7717ba4410d1c39ce.png)  
The third pic shows the results:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/c/dcbcf32af1850e9841759de0cfb8a6790c34390f.png)  
What does the large negative quality number mean?

Second question: the tag values are captured `OnChange`, so if there is no change for a period of time, would the dataset show empty values and maybe this negative quality value?

Edit: Third question:  
is `MinMax` the best aggregation for reviewing the float and boolean values?

Note: for that one guy who's going to ask if "KW" means kilowatts, yes, it does and yes it's supposed to be "kW". 😉

---

<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:** [September 29, 2026, 5:14pm UTC](https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249/2 "2026-09-29T17:14:15Z")

</div>

Those are bad qualities. Which is why value is empty (null).

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [September 29, 2026, 10:08pm UTC](https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249/3 "2026-09-29T22:08:30Z")

</div>

But the binding mechanism does not recognize them as bad quality. the quality codes go from 0 to 700 something, if i remember correctly.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 29, 2026, 11:50pm UTC](https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249/4 "2026-09-29T23:50:33Z")

</div>

There's two different "quality code" systems since 8.0.0, and -2147483136 indeed means "Bad" (no qualifiers) in the new system.

I don't remember the intricacies of how the "new" codes interact with the historian; my gut instinct is that the stored data (at least in SQL historians) should be using the old codes for compatibility but I really don't know.

Citation:

> **[Vision Component Overlay Chart​ - Quality Codes and Overlays | Ignition User...](https://www.docs.inductiveautomation.com/docs/8.3/platform/tags/quality-codes-and-overlays#vision-component-overlay-chart)**
>
> A Quality Code represents a level of confidence in a value. Quality codes are made up of a level (Good, Bad, Error, or Uncertain) and an integer. If a value's quality is not Good, the value generally should not be trusted.

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [September 30, 2026, 12:12am UTC](https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249/5 "2026-09-30T00:12:59Z")

</div>

Yeah I was just reading the overlay docs. In the SQL table, all I see are `0, 192, 600`. Nothing else as far as the column `dataintegrity` goes.

The thing is, I would like to give our engineer something useful, without empty values. He's been asking for the raw historical data and puts that into a spreadsheet. If I could provide cleaner data or something similar to what he is doing in the spreadsheet...

As to my second question, I believe the answer may be that `OnChange` includes quality changes. Is there a way to filter out the garbage in the expression window? Ah, I think Phil's Toolkit has something that might work. Have to look into that.

Edit: @pturmel do you have an example of using the `view()` expression function? I appreciate it.

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [September 30, 2026, 3:52am UTC](https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249/6 "2026-09-30T03:52:12Z")

</div>

> [@mdemaris](#):
>
> is `MinMax` the best aggregation for reviewing the float and boolean values?

> [@mdemaris](#):
>
> He's been asking for the raw historical data and puts that into a spreadsheet

I think I would start with LastValue for the aggregation, with points AsStored, then ensure the data makes sense. I'd be cautious using interpolation if the query is configured to return more points than are stored in the historian. If # historical points \>\> query # points, then MinMax starts to make sense for trending

In your data, I find it odd that kW goes from exactly 0 to exactly 64.1, to 0, to 64.1, with several bad qualities in between - all within 1 sec. Is that data accurate?

---

<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:** [September 30, 2026, 11:46am UTC](https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249/7 "2026-09-30T11:46:43Z")

</div>

> [@mdemaris](#):
>
> using the `view()` expression function?

Unless you need to use `PIVOT`, I strongly recommend using the various iteration functions introduced in 2023. In this case, the [where()](https://www.automation-pros.com/toolkit/doc/iteration.html#where) functions.

You would put your history binding on a custom property (set to private), and put this expression where you need the null-free filtered result:

```python
where({path.to.history.prop}, !isNull(it()['value']))

```

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [October 7, 2026, 7:11pm UTC](https://forum.inductiveautomation.com/t/tag-historian-expression-binding-issues/117249/8 "2026-10-07T19:11:25Z")

</div>

> [@Chris\_Bingham](#):
>
> In your data, I find it odd that kW goes from exactly 0 to exactly 64.1, to 0, to 64.1, with several bad qualities in between - all within 1 sec. Is that data accurate?

I doubt it. Probably due to the nature of the `OnChange` property coupled with the `Deadband Style` set to `Analog`.
