# Calculate the AVG temperature only of working hours (8:00-18:00)

**URL:** <https://community.grafana.com/t/calculate-the-avg-temperature-only-of-working-hours-800/74356>\
**Category:** InfluxDB\
**Tags:** dashboard, influxdb\
**Created:** [October 18, 2022, 8:22am UTC](https://community.grafana.com/t/calculate-the-avg-temperature-only-of-working-hours-800/74356 "2022-10-18T08:22:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsl17](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@fsl17](https://community.grafana.com/u/fsl17)\
**Post date:** [October 18, 2022, 8:22am UTC](https://community.grafana.com/t/calculate-the-avg-temperature-only-of-working-hours-800/74356/1 "2022-10-18T08:22:38Z")

</div>

Hi,

I’m new to Grafana and I want to use it to display some graphs (e.g. Gauge) in Home Assistant. My database is influxDB and I just want to calculate average temperature in working hours. That is, if I select the last 24 hours or the last 2 days as the time range in Grafana, I only want to consider the temperature data in the working hours(e.g. 8:00-18:00 and ignore the rest) when calculating the average temperature.  
is there a way to do that?  
Thanks in advance!
