Splunk Search

How to Add two results

wasifchowdhury
Explorer

wasifchowdhury_0-1631111314504.png

How do I add the two values from stats which I get from these query?

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Check the addcoltotals command.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Check the addcoltotals command.

---
If this reply helps you, Karma would be appreciated.
0 Karma

wasifchowdhury
Explorer

where should I use the addcoltotals command? After |stats max?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Yes.  The columns have to exist before addcoltotals can add them.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...

Operationalizing Entity Risk Score with Enterprise Security 8.3+

Overview Enterprise Security 8.3 introduces a powerful new feature called “Entity Risk Scoring” (ERS) for ...

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...