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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...