Hei, how to make it to show also data that was added today first time. At the moment it will start showing diffrences on next day compared to todays last value.
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "diagnostics" and r._field == "diagnostics_odometer_data_value" )
|> aggregateWindow(every: 1h, fn: last, createEmpty: false)
|> difference(nonNegative: false, columns: ["_value"], keepFirst: false)
|> group(columns: ["property"])
|> sort(columns: ["_time"], desc: true)
Have you tried using the today() funciton?
You might need to use the timeShift() function
This thread might also be useful to you: