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!

Index This | Why did the turkey cross the road?

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

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...