Splunk Search

How to merge values of the same field extraction?

shivarpith
Path Finder

I have 4 unique and standard values under one field extraction topic. I want to combine them into two values and use the output for my tokens in dashboard panels.

topic   | count
A       | 10
Aa      | 10
B       | 5
bb      | 5

Required output

topic   | count
A       | 20
B       | 10
0 Karma

somesoni2
Revered Legend

Can we have to some real sample output? What type of values does the field topic contains?

0 Karma

sundareshr
Legend

Try this

base search | stats sum(eval(if(match(topic, "^([A|a])", count, null()) )) as A sum(eval(if(match(topic, "^([B|b])", count, null()) )) as B 
0 Karma
Get Updates on the Splunk Community!

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...