What you are looking for is called moving average
[{"id":"8485c3f8e4265fa0","type":"inject","z":"99bbfbdd.2d4768","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":1480,"wires":[["678138d7a6a354ce"]]},{"id":"af5a405fbbe17fd5","type":"debug","z":"99bbfbdd.2d4768","name":"debug 13","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":740,"y":1480,"wires":[]},{"id":"678138d7a6a354ce","type":"function","z":"99bbfbdd.2d4768","name":"Moving average","func":"const COUNT_VALUES = 60\nlet avg = context.get(\"avg\") || 0\n\nmsg.payload = (avg * (COUNT_VALUES - 1) + msg.payload) / COUNT_VALUES\ncontext.set(\"avg\", msg.payload)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":1480,"wires":[["af5a405fbbe17fd5"]]}]