Splunk Search

merge two data sets

jakushok
New Member

Hi,

I have two sets of data (A and B):
A | B
8 | 6
2 | 6
10 | 8
6 | 8

I want to count and merge into sing table:
val | count_A | count_B
2 | 0 | 1
6 | 1 | 2
8 | 1 | 2
10 | 1 | 0

Thanks.

Tags (3)
0 Karma

somesoni2
Revered Legend

Assuming your current search returns two fields A and B, try something like this

your current search giving fields A and B
| eval temp=1 
| untable temp column val | eval column="count_".column
| chart count over val by column
0 Karma
Get Updates on the Splunk Community!

Splunk MCP & Agentic AI: Machine Data Without Limits

  Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization ...

Finding Based Detections General Availability

Overview  We’ve come a long way, folks, but here in Enterprise Security 8.4 I’m happy to announce Finding ...

Get Your Hands Dirty (and Your Shoes Comfy): The Splunk Experience

Hands-On Learning and Technical Seminars  Sometimes, you just need to see the code. For those looking for a ...