Solved

How do I add a "daily sum" calculation to a chart


I have looked through topics here and seen, for example, someone saying you can add Cumulative sum calculation to a chart. I tried real hard to find CUSUM in the Operators list but can’t find it.
What I want to do is have a daily sum calculated (midnight-to-midnight) and scheduled no a daily basis

 

icon

Best answer by Johannes Hovda 9 July 2024, 13:12

View original

3 replies

Userlevel 2
Badge +3

Can you just use the SUM aggregates directly?
 

 

Excellent. Thanks. So that i where the “sum” aggregate is!!
That is exactly what I was looking for
Quick check: if I schedule that with a “day” granularity, will it do the calculation from midnight-to-midnight?

Userlevel 2
Badge +3

It should default to midnight to midnight:

Aggregates are aligned to the start time modulo of the granularity unit. If you ask for daily average temperatures since Monday afternoon last week, the first aggregated data point will contain averages for the whole of Monday, the second for Tuesday, etc.

https://developer.cognite.com/dev/concepts/aggregation/#granularity

Reply