Splunk Search

How to sum multiple individual columns into a flat row

eric_delac
New Member

I have a search that based on a lookup that is pulling names and totals over the course of a 24 hour period or week based on time. How can I sum each column without having to sum every field individually?

cdr_events duration>0
( (callingPartyGroup="00581" OR originalCalledPartyGroup="00581" OR finalCalledPartyGroup="00581") )

| calculate_all_internal_parties
| lookup groups number as number output name group subgroup
| search ( group="00581" )
| timechart dc(callId) by name

I could get it by running a | sum("Tony Freeman") as "Tony Freeman" sum("Andrea Cook" as "Andrea Cook" etc etc but is there an easier way to do that?

0 Karma

skoelpin
SplunkTrust
SplunkTrust

You can use addtotals to sum the column values like this

| addtotals fieldname=sum

https://docs.splunk.com/Documentation/Splunk/8.0.1/SearchReference/Addtotals

0 Karma

eric_delac
New Member

alt text

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...