Hello All,
I’m using grafana 10.1
I would to compute kwh per day from last 2 weeks. My computation of kwh working well but the time selection is not correct:
I used:
|> range(start: -2w, stop: -1d)
When I use this range it took my current time to compute the 2 weeks. So, if the time is 14:21 (07/21) so the data will start from (07/07: 14:21 to 07/20-14:21). which it is not good.
I would like data from midnight (00:00) like this:
-07/07 - 00:00 to 07/20 - 23:59
Ideally I should use:
|> range(start: -2w/d, stop: -1d/d)
But it do not work in my flux:
“Status: 500. Message: invalid: error @5:22-5:23: undefined identifier d error @5:18-5:23: duration is not Divisible error @5:35-5:36: undefined identifier d error @5:31-5:36: duration is not Divisible”
So how to proceed ?
Thanks for your help