Best method to display all values greater than x in a certain period?

What would be the best way, for example, to display all tanks in which their temperature was 150 degrees and higher over the last 24 hours. This could then give a report of something and a bonus would be a showing which time periods it was 150 degrees and over. These are all actively in historian and have a similar tag structure with only a single indirect parameter differentiating them.
I’ve been racking my brain if this would be something done in a Report, Named query, or Transaction group, etc…? Thanks

Don’t know if its the best way. But, I would do it with the reporting module using nested queries using named queries.

I was thinking along those lines. I was trying to do a tag historian query which has all the built in power to span over all the tables (we have history split by months), then somehow query that query. But I don’t think that’s what nested queries do, I’m having trouble getting that to work.

The sub-query would be part of the nested query. If you don’t have someone who can write a query like that handy. Maybe you could do your Tag History Query then dump that into a data-set param. But, that might come with its own problem set. Say, if they are to large or what-not.

The best thing I ever did was concentrate on learning SQL properly.

Consider using your tag historian query to collect all the raw data you need, then use a script data source to reprocess that data into the nested data keys you need. Your report’s charts and tables (and/or nested tables) would use the reprocessed data. This post might help you:

1 Like