Splunk Search

Creating a line graph based on two different medians

wajeeh911
Engager

I have a table below in splunk. I'm trying the create a line graph which would graph four lines. The X axis would be the bypass value. The Y axis would be the the 50th percentile and 80th percentile of Type3 and and the 50th and 80th percentile of Type4. But there doesn't seem to be a way to do a stats, eval, if statement. 

Labels (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

@wajeeh911 

See this example - it first creates a similar data sample set to your data then just uses the chart statement to do what you describe.

| makeresults 
| eval n=mvrange(1,31)
| mvexpand n
| eval Type="Type".(random() % 2 + 3)
| eval Bypass="S".(random() % 3 + 37)
| eval TotalTime=random() % 15 + (random() / 100000)
| table TotalTime Bypass Type
| chart perc50(TotalTime) as p50 perc80(TotalTime) as p80 over Bypass by Type

Hope this helps

 

0 Karma
Get Updates on the Splunk Community!

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...