Find the total sum of a variable starting from a specific time in the past and up until the newest data point

Hi @Nikolay_Stepin and welcome to the Losant forums!

As you suggested, you can use the sum aggregation method in the Gauge dashboard block to display the sum of up to 180 days of historical data for a single device attribute across one or more devices.

If you want to display a longer duration, or if you want to run other calculations, I suggest using workflow storage to maintain an iterative value that can be stored as a new device attribute. I created an example of this a few months ago for somebody with a similar use-case. You’ll want to tweak this to fit your specific needs, but hopefully will get you on the right track if you pursue this option:

Let us know if one of these options will work for you, and once again, thanks for joining us on our forums!