Hi all
I'd like to plot the difference between two values on a timechart
Example data:
| _time | a | b |
| t | 10 | 1 |
| t+1s | 11 | 1.5 |
| t+2s | 12 | 2 |
Expected resulting data
| time | a | b | c |
| t | 10 | 1 | 9 |
| t+1s | 11 | 1.5 | 9.5 |
| t+2s | 12 | 2 | 10 |
I'm using the query
index=indx sourcetype=src (Instrument="a" OR Instrument="b")
| eval c = a - b
| timechart values(a) values(b) values(c) span=1s
Any ideas where I'm going wrong?
Hi @dataisbeautiful,
try to add eval after the timechart:
index=indx sourcetype=src (Instrument="a" OR Instrument="b")
| timechart values(a) values(b) span=1s
| eval c = a - bCiao.
Giuseppe
Hi @dataisbeautiful,
try to add eval after the timechart:
index=indx sourcetype=src (Instrument="a" OR Instrument="b")
| timechart values(a) values(b) span=1s
| eval c = a - bCiao.
Giuseppe
Thank you @gcusello, that worked