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!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...