Hello,
I’m trying to create a bar chart that compares the current year with the previous year.
For this, I have a query that manages the current year and another that manages the previous year.
A :
import "experimental"
from(bucket: "House")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "Calcul")
|> filter(fn: (r) => r["_field"] == "General")
|> aggregateWindow(every: 1mo, fn: sum, createEmpty: false)
|> experimental.alignTime(alignTo: 2024-01-15T00:00:00Z)
B :
import "experimental"
from(bucket: "House")
|> range(start: 2023-01-01T00:00:00Z, stop: 2024-01-01T00:00:00Z)
|> filter(fn: (r) => r["_measurement"] == "Calcul")
|> filter(fn: (r) => r["_field"] == "General")
|> aggregateWindow(every: 1mo, fn: sum, createEmpty: false)
|> experimental.alignTime(alignTo: 2024-01-15T00:00:00Z)
Hover display correctly shows value for previous year
But not for the current year
I think it’s a bug because if I add a third query 2 displays the value and 1 displays the date
Thanks in advance for any help