Best way to compare a previous time period on the same data point.
-
What kind of source point? An accumulator or a power reading?
Assuming something simple like a point that only has the day's kWh value, you could do....
var yearAgo = new Date(); yearAgo.setYear(yearAgo.getYear() - 1); var yearAgoValueTime = p.pointValueBefore( yearAgo.getTime() ); return p.value - yearAgoValueTime.value;
-
Hi Phil,
These are all kWh that I've calculated from kW's, and stored them per hour. So I would need to roll up and sum each days worth of kWh's over the course of a month exactly one year ago. I hope that makes sense.
-
Do you need this stored in the database or can you do the rollups in the UI or reports. In both the Mango Dashboards and the Excel reports Mango has really good rollup functions so you can easily display the 1 month sum of your kWh values.
-
Hi Joel,
I should be able to do the rollup in the UI (DGLux5). Basically looking to display current months worth of data along side the same month from last year.
-
I think if you just keep 2 + years of data in Mango you should be able to do those time quires in DGLux.
-
Thanks Joel. I need to adjust my purge settings 2 years on all my points. What's the easiest way to do that without having to open each point and change them individually?
-
You should only need to do that on the System Settings page under the Purge settings.
By default all the data sources and points use the system purge settings. You can override this on a data source or data point level if you want.
-
Thanks Joel, I did set that to 2 years on the System Purge settings, I guess I was expecting the individual points to reflect the new purge value, when looking at their settings. No big deal either way, as long as the system wide setting takes care of it.
-
As long as the check box for "over ride purge settings" isn't checked you are fine.
-
Awesome, Thanks.