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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

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