Splunk Enterprise Security

How to I pass 2 fields from subsearch

squatforeever
New Member

Hi guys,
I'm having a query that take 2 fields from specific index type, and then going out to the main index in order to get more useful info
for the search.
The query is working only when I put a 1 field from the subsearch, but I want to pass 2 fields from the subsearch
now Its something like:

MAIN INDEX SEARCH |
[ specific sourcetype index search=xxx| table field1 field2]
stats values(fieldx) values(fieldy) values(field1) by field2

So I need to pass 2 of the fields from the subsearch. but it only works with 1 field each time, cant do it with both.

Would like to hear suggestions how to pass 2 fields (or more) from subsearch to the main search

Thanks!!!

0 Karma

anmolpatel
Builder
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...