Splunk Search

How to get the sum of each columns?

HideOnCode82
Engager

Hello everyone,

Thanks for reading, my english is not good at all.

I have this:

A B C D E F G
1 1 0 4 1 0 0
1 2 0 2 2 0 9
0 0 0 1 3 0 8
0 1 0 0 4 0 9
0 0 0 9 5 0 0
0 0 0 8 0 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 0

 

So, i need sum all value of each column

I would like to have this:

Column sum
A 2
B 4
C 0
D 24
E 15
F 1
G 26
Labels (3)
Tags (2)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @HideOnCode82,

what is your search? could you share it?

Anyway, see the addcoltotals command (https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Addcoltotals) to have the sums you need at the bottom of your table.

If instead you want only the total row reversed, it's possible but you have to work a little, if you could share your search I could help you.

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @HideOnCode82,

what is your search? could you share it?

Anyway, see the addcoltotals command (https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Addcoltotals) to have the sums you need at the bottom of your table.

If instead you want only the total row reversed, it's possible but you have to work a little, if you could share your search I could help you.

Ciao.

Giuseppe

HideOnCode82
Engager

Thanks you so much!!!

It worked perfect!

 

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 ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...