Splunk Search

How to calculate sum of the two count values?

ABHAYA
Path Finder

I am using above splunk query   stats count by BankType.

 I am getting result as 

 SBI   27

AXIS   15

CITI   12.

but I want to sum the count of Axis and citi and  display it under AXIS column. so basically output would be something like this 

SBI 27

AXIS 27.

Can anyone suggest what can we do here ?

 

 

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval BankType=if(BankType=="CITI", "AXIS", BankType)
| stats count by BankType

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| eval BankType=if(BankType=="CITI", "AXIS", BankType)
| stats count by BankType
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...