Splunk Search

Calculations on search results

motzgogh
Engager

I am a complete splunk newbie and I'm trying to find information on how powerful the searches and reports can be.
Let's say I have a log of sourcetype transactions (with extracted fields account_number and amount). Can I write a search that calculate the current balance on all accounts by first finding all unique accounts and then adding all associated amounts?

Tags (2)
0 Karma
1 Solution

ziegfried
Influencer

Yup.

sourcetype=my_transactions account_number=* | stats sum(amount) as amount by account_number

View solution in original post

ziegfried
Influencer

Yup.

sourcetype=my_transactions account_number=* | stats sum(amount) as amount by account_number
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...