I have two values x and y. Both values are dynamic (keeps on changing).
x indicates _time and y indicates a value that continuosly changes with time.
I want the value of y at two particular instances of x.
I do this,
|eval mytime = round(_time)
|eval mytime2 = round(_time) - 40
I wish to have value of y when x's value is mytime and
the value of y when x's value is mytime2 (i.e. 40 sec before current time)
If condition only helps to get the value of y when x is mytime, but it won't help when x = mytime2. When x=mytime2 , it still gives the same value as mytime. But it shouldn't be the case.
could you provide what query you have tried?
could you provide sample inputs and expected output to better understand
X | Y
1518074558| 464758
1518074559| 5757657
1518074560| 464533
1518074561| 667231
1518074562| 77654
1518074563| 00987
1518074564 | 567843
X indicates UNIX time.