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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...