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!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...