Dashboards & Visualizations

How to create a new variable using Eval and then pass it in Timechart

aditsss
Motivator

Hi Everyone,

I need to create one variable using Eval my variable name is  - JOB_EXEC_TIME how can I create a variable using eval.

And then I need to pass it in below query:

timechart sum(JOB_EXEC_TIME) as TotalExecTime by JOB_NM

Can someone guide me How can I do this in splunk.

Labels (3)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@aditsss 

 

Can you please share more details where you want to create variable like (from input or search result) and how you want to use in time chart?

0 Karma

aditsss
Motivator

@kamlesh_vaghela 

Currently I am passing JOB_EXEC_TIME is my timechart like below:

 

 timechart sum(JOB_EXEC_TIME) as TotalExecTime by JOB_NM

 

Now I want to pass -JOB_EXEC_TIME(reverse order) in timechart.How can I pass that.

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust
Did you tried?

|timechart sum("JOB_EXEC_TIME(reverse order)") as TotalExecTime by JOB_NM
0 Karma

aditsss
Motivator

@kamlesh_vaghela 

nothing is coming

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust
Is it possible to share sample OP of search before time chart?
0 Karma

aditsss
Motivator

@kamlesh_vaghela 

what is OP?

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust
Output
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...