Splunk Search

i have a query that outputs a chart with 3 columns. I want to output another column that has the delta between the column 2 and 3.

shrey12
Explorer

Query : MSTC>0 run_id=123 OR run_id=456 | sort 0 MSTC | rename "Actual Battery Power _B0AP" as Battp | chart avg(Battp) as Battery by MSTC, run_id

Chart is as follows
MSTC 123 456 delta(Column that I need help with)
1 5 5 0
2 6 5.9 0. 1
3 10 10.5 0.5

Tags (2)
0 Karma
1 Solution

woodcock
Esteemed Legend

Try this:

MSTC>0 run_id=123 OR run_id=456 | sort 0 MSTC | rename "Actual Battery Power _B0AP" as Battp | chart avg(Battp) as Battery by MSTC, run_id | eval Delta=run_id-Battery

View solution in original post

0 Karma

woodcock
Esteemed Legend

Try this:

MSTC>0 run_id=123 OR run_id=456 | sort 0 MSTC | rename "Actual Battery Power _B0AP" as Battp | chart avg(Battp) as Battery by MSTC, run_id | eval Delta=run_id-Battery
0 Karma
Get Updates on the Splunk Community!

New Case Study Shows the Value of Partnering with Splunk Academic Alliance

The University of Nevada, Las Vegas (UNLV) is another premier research institution helping to shape the next ...

How to Monitor Google Kubernetes Engine (GKE)

We’ve looked at how to integrate Kubernetes environments with Splunk Observability Cloud, but what about ...

Index This | How can you make 45 using only 4?

October 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...