# Chart data history consolidation

**URL:** https://discourse.nodered.org/t/chart-data-history-consolidation/100681
**Category:** General
**Created:** [29 March 2026 16:38 UTC](https://discourse.nodered.org/t/chart-data-history-consolidation/100681 "2026-03-29T16:38:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MyRandomThoughts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myrandomthoughts/32/41085_2.png) [@MyRandomThoughts](https://discourse.nodered.org/u/MyRandomThoughts)
#### Post date: [29 March 2026 16:38 UTC](https://discourse.nodered.org/t/chart-data-history-consolidation/100681/1 "2026-03-29T16:38:02Z")

</div>

I have a device outputs a single value that gets logged every 5 minutes. I don't want to store that massive amount of data over a year so want to average it out over different time periods.

Something like once I have over an hours' worth of data (12x data points) the previous hour gets averaged into a single value for the hour.

Then at the end of the day, the previous day is averaged, so the data stored is now daily, 23 hours, and 12x 5 minute values.

You sometimes see this sort of thing in historical resource graph (vCenter was a good example of this).

Does anyone have a script, node or flow that will do this?

Thanks

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [29 March 2026 17:14 UTC](https://discourse.nodered.org/t/chart-data-history-consolidation/100681/2 "2026-03-29T17:14:17Z")

</div>

If you use influxdb then you can store the most recent data and can define Retention Policies and Continuous Queries to automatically downsample the data for longer term storage.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 June 2026 17:14 UTC](https://discourse.nodered.org/t/chart-data-history-consolidation/100681/3 "2026-06-27T17:14:46Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
