# Problem displaying min, max, and average on reports

**URL:** <https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [December 21, 2020, 1:48pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692 "2020-12-21T13:48:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmachuca](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@dmachuca](https://forum.inductiveautomation.com/u/dmachuca)\
**Post date:** [December 21, 2020, 1:48pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692/1 "2020-12-21T13:48:20Z")

</div>

I have a report that I am trying to display a history tag over a period of time. On the report I want to display the value, the min, the max and the average. When I run the reports the value shows correct but the min, max and average show “\<N/A\>”. I am trying to achieve this using a “Tag Historian Query”.

Can someone assist me with this issue.

Thank you.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [December 21, 2020, 4:23pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692/2 "2020-12-21T16:23:11Z")

</div>

You need to use a Calculated History Tag query and not a regular Historical Tag Query.

---

<div class="post-metadata">

**Author:** ![DSI600](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DSI600](https://forum.inductiveautomation.com/u/DSI600)\
**Post date:** [December 21, 2020, 6:17pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692/3 "2020-12-21T18:17:50Z")

</div>

You can’t ask for help on the test - This will be a good way for you to not pass if they catch you.

---

<div class="post-metadata">

**Author:** ![dmachuca](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@dmachuca](https://forum.inductiveautomation.com/u/dmachuca)\
**Post date:** [December 21, 2020, 6:19pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692/4 "2020-12-21T18:19:24Z")

</div>

That worked. But know in that type of data source I do not get the sample size option as I do on a Tag Historian Query. For example, I need to display the average, min and max of the last 24 hours every hour.

---

<div class="post-metadata">

**Author:** ![dmachuca](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@dmachuca](https://forum.inductiveautomation.com/u/dmachuca)\
**Post date:** [December 21, 2020, 6:21pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692/5 "2020-12-21T18:21:17Z")

</div>

I already completed and submitted the test. This question is to help a coworker with an issue we are running in a real application for one of our costumers and I happened to do it on my test project.

---

<div class="post-metadata">

**Author:** ![DSI600](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DSI600](https://forum.inductiveautomation.com/u/DSI600)\
**Post date:** [December 21, 2020, 6:23pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692/6 "2020-12-21T18:23:47Z")

</div>

Gotcha - If you want more help from others I would just not post it like that. A lot of people won’t even attempt to help since that looked like what you were doing.

---

<div class="post-metadata">

**Author:** ![dmachuca](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@dmachuca](https://forum.inductiveautomation.com/u/dmachuca)\
**Post date:** [December 21, 2020, 6:29pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692/7 "2020-12-21T18:29:58Z")

</div>

Thanks for the tip. This is my second time using this forum.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 21, 2020, 8:08pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692/8 "2020-12-21T20:08:31Z")

</div>

To be fair, I saw a question a while back that looked like a certification question and I mentioned it on the post but came up red-faced as it turned out to be a legit question. It pays not to assume anything 😅

---

<div class="post-metadata">

**Author:** ![Sam.Taylor](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@Sam.Taylor](https://forum.inductiveautomation.com/u/Sam.Taylor)\
**Post date:** [May 4, 2022, 9:15pm UTC](https://forum.inductiveautomation.com/t/problem-displaying-min-max-and-average-on-reports/41692/9 "2022-05-04T21:15:05Z")

</div>

How do I reference a min, max and average value from a tag calculation query? My report consists of a line graph from a tag historian query and under each graph I want to display the min, max and average from that time period. What I’ve found if using the calculations from the tag historian query that some of the values return either “N/A” or “NAN.” However when using a tag calculation query when I try and drag the value from the key browser is that nothing references the specific tag in question and it comes back with NAN or N/A in the preview.
