Dashboards & Visualizations

Splunk Stats Command

Ripster001
New Member

Is there a way to run multiple stats commands on two separate Columns? My data set looks likes this: 

Col 1Col 2
Foo""
""Bar

 

I want to count both columns and the sum both columns and the divide column one by the sum of Col 1 + Col 2. Is this possible, I'm pretty new to Splunk and only have had training for Splunk Fundamentals One. 

Anything helps, thanks! 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Something along these lines?

| eventstats sum(col1) as sum_col1 sum(col2) as sum_col2 count(col1) as count_col1 count(col2) as count_col2
| eval sum_both=sum_col1+sum_col2
| eval col1=col1/sum_both
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

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

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

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