Splunk Search

I want to calculate sum of the values of columns and save them in separate variables using loop (ex. foreach)

nkankur
Path Finder

Field_1 Field_2 Field_3 Field_4 ........
1 1 4 9 .......
8 7 0 11 .......

sum_1=9 sum_2=8 etc...

Please help 🙂

Thanks in advance!

Tags (1)
0 Karma
1 Solution

HiroshiSatoh
Champion

Try this!

(your search)|stats sum(Field_*) as Field_*

View solution in original post

0 Karma

HiroshiSatoh
Champion

Try this!

(your search)|stats sum(Field_*) as Field_*
0 Karma

nkankur
Path Finder

Thanks A lot! It's Working 🙂

0 Karma
Get Updates on the Splunk Community!

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

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...