0

I'm trying to conditionally assign a value to the variable START as part of a Flux query:

WINDOW = 1d
START = if WINDOW == 1d then today() else 2022-01-01

This results in the following error:

unsupported binary expression duration == duration

What is the correct syntax/approach?

1 Answers1

0

Try to convert it to string and then compare:

if string(v: WINDOW) == string(v: 1d) then today() else 2022-01-01
Myrat
  • 19
  • 3