# How to make a gauge in Perspective show an averaged value?

**URL:** <https://forum.inductiveautomation.com/t/how-to-make-a-gauge-in-perspective-show-an-averaged-value/92376>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 26, 2024, 1:43am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-gauge-in-perspective-show-an-averaged-value/92376 "2024-06-26T01:43:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erik\_Amundson](https://avatars.discourse-cdn.com/v4/letter/e/ecccb3/32.png) [@Erik\_Amundson](https://forum.inductiveautomation.com/u/Erik_Amundson)\
**Post date:** [June 26, 2024, 1:43am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-gauge-in-perspective-show-an-averaged-value/92376/1 "2024-06-26T01:43:20Z")

</div>

I have a gauge on a Perspective display that has the value bound to a modbus data point I'm grabbing from a sensor. This sensor happens to be a wind direction sensor that bounces around a lot. For that reason, I'd really like to use an average of the past 5 seconds or 10 second of data for the value that is represented by the gauge.

I can figure out how to point the value at a Tag History type binding, using simple averaging, to return this value, but that generates a dataset or a document. The gauge type widget doesn't like those objects, and wants a raw numerical value.

How do I get a gauge (or other widget that expects a simple numerical value) to use an average of the last bunch of values from a Tag History query? I can't seem to figure out how to do this. Any help would be very appreciated.

---

<div class="post-metadata">

**Author:** ![Joel\_Farley](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@Joel\_Farley](https://forum.inductiveautomation.com/u/Joel_Farley)\
**Post date:** [June 26, 2024, 3:13am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-gauge-in-perspective-show-an-averaged-value/92376/2 "2024-06-26T03:13:00Z")

</div>

If you make a custom property with a tag history binding returning a dataset, you can then bind the value to mean({this.custom.key},1)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac356301366ac3a1d69817caa8e6e788bf213ca5.png)

---

<div class="post-metadata">

**Author:** ![Erik\_Amundson](https://avatars.discourse-cdn.com/v4/letter/e/ecccb3/32.png) [@Erik\_Amundson](https://forum.inductiveautomation.com/u/Erik_Amundson)\
**Post date:** [June 27, 2024, 1:46am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-gauge-in-perspective-show-an-averaged-value/92376/3 "2024-06-27T01:46:57Z")

</div>

Thank you thank you thank you! This worked wonderfully!
