can you explain your problem a bit more?
Like I am not able to understand why you are using three measurements.
First, do you want to take the maximum at the day level and then do the sum for the month of those maximum values?
The 3 measurements are delivered by the electricity power box provider depending the cost of the day (not needed here), but it’s needed for future usage. That is why I have these 3 measurements that I need to keep in my query.
Yes, you’re right, I need to take the maximum at the day level and then do the sum for the month of those maximum values.
Sorry for my English, I’m not English fluent speaker
Thanks a lot for your reply,
It works very well, I was disturbed to know how to integrate the second aggregatewindow instruction (never at the good position)
First alternative is good to understand step stages also
Using the data, it looks strange, the sum of January month is assigned to Feb month for exemple. One moth later than daily consumption month reference.
You can see that with the aggregate by day, I got well the consumption day by day starting January 5th.
When I add the aggregate by month, January consumption is assigned to Feb, Feb to March, I do not undestand why because all looks good with the timestamp ?
Actually, if you do aggregation on a daily basis then suppose for 16 May your last data point came at 23:59:00 then it will show for 17 May at 00:00:00
same for last data point for 17 May came at 23:59 then it will show at 18 May at 00:00.
The same thing is happening for the month as well but you can use the
timeShift(duration: 1mo, columns: ["_time"])
and it will shift the time column Jan data will show for the Jan month