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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...