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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...