Knowledge Management

How can I use the result table's value of the timechart

i111040d
New Member

My search:

|timechart span=1s sum(bit) by dst

Result table:

_time,1.1.1.1,2.2.2.2,3.3.3.3
090000,300,300,300
090001,200,200,500
090002,100,400,400

I want the table(displaying the time and the value when sum(bit) is biggest):

1.1.1.1,2.2.2.2,3.3.3.3
090000,090002,090001
300,400,500

or

dst,time,sum(bit)
1.1.1.1,090000,300
2.2.2.2,090002,400
3.3.3.3,090001,500

How can I transform the table?

Tags (1)
0 Karma

somesoni2
Revered Legend

Try like this

your base search | bucket span=1s _time | stats sum(bit) as bit by _time dst | eventstats max(bit) as max by dst | where bit=max | table dst _time bit
0 Karma

i111040d
New Member

Thanks somesoni2
I could do it!

0 Karma

sundareshr
Legend

Try this

... | bin span=1s _time | stats sum(bit) as s by dst _time | stats values(dst) as dst max(s) bits by  _time | table dst _time bits 
0 Karma

i111040d
New Member

Thanks sundareshr!
But I need the biggest value for each "DST".

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!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...