Hello everyone.
I have a request, that returns two data streams:
import "sampledata"
import "experimental"
import "experimental/aggregate"
yesterday = from(bucket: "jmeter_night")
|> range(start: experimental.subDuration(from: now(), d: 48h), stop: experimental.subDuration(from: now(), d: 24h))
|> filter(fn: (r) => r["_measurement"] == "jmeter")
|> filter(fn: (r) => r["application"] == "my application")
|> filter(fn: (r) => r["_field"] == "pct95.0")
|> filter(fn: (r) => r["transaction"] == "all")
|> group(columns: ["transaction"])
|> aggregateWindow(every: 10m, fn: mean)
|> timeShift(duration: 24h, columns: ["_start", "_stop", "_time"])
today = from(bucket: "jmeter_night")
|> range(start: experimental.subDuration(from: now(), d: 24h), stop: now())
|> filter(fn: (r) => r["_measurement"] == "jmeter")
|> filter(fn: (r) => r["application"] == "my application")
|> filter(fn: (r) => r["_field"] == "pct95.0")
|> filter(fn: (r) => r["transaction"] == "all")
|> group(columns: ["transaction"])
|> aggregateWindow(every: 10m, fn: mean)
How can i get the difference between “today” and “yesterday”?
I need to see values = today - yesterday.