Splunk Search

Summing the row

vinay_ks04
New Member

Colum A Column B
1 1
2 2
2 3
2 4
5 5

I wanted to sum columnB but on condition. Below is the example

(Column A) - 1 (Sum of Column B) 1
(Column A) - 2 (Sum of Column B) 2 + 3 + 4 = 9

Tags (2)
0 Karma

gfuente
Motivator

Hello

I think you can use eventstats like:

...| eventstats sum(ColumnB) as Total by ColumnA | ...

Try it and let me know

Regards

0 Karma

gfuente
Motivator

The same but with both fields in the by:
...| eventstats sum(ColumnB) as Total by Site, ConfigID | ...

0 Karma

vinay_ks04
New Member

Hi,

I have used for my another column.

there are three columns

Site ConfigID TaskCount
BAN 1 1
2 2
3 4
5 5
MYS 1 1
1 2
3 4
4 5
4 6

I have used your menthod for consolidating with site wise.
Kindly let me know for summing of taskcounts of same configids.

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...