Skip to main content
Answer

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

  • July 9, 2024
  • 3 replies
  • 69 views

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

 

Best answer by Johannes Hovda

Can you just use the SUM aggregates directly?
 

 

3 replies

Johannes Hovda
Practitioner
Forum|alt.badge.img+3

Can you just use the SUM aggregates directly?
 

 


  • Author
  • Seasoned
  • July 9, 2024

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?


Johannes Hovda
Practitioner
Forum|alt.badge.img+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