Tag Historian Expression Binding issues

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:


And in the second pic, showing the binding:

The third pic shows the results:

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". :wink:

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

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

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:

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.

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?

Unless you need to use PIVOT, I strongly recommend using the various iteration functions introduced in 2023. In this case, the 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:

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

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