Splunk Search

Stuck in writing complex query

Pathik
Path Finder

I want to get below in single query

1. dc of field1 overall

2. dc of field2 by field1

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust
| eventstats dc(field1) as dc_field1
| stats dc(field2) as dc_field2, max(dc_field1) by field1
---
If this reply helps you, Karma would be appreciated.

Pathik
Path Finder

exactly the way I wanted... thanks a ton

richgalloway
SplunkTrust
SplunkTrust

If your problem is resolved, then please click the "Accept as Solution" button to help future readers.

---
If this reply helps you, Karma would be appreciated.
0 Karma

Pathik
Path Finder

I want to get below in single query

1. dc of field1 overall

2. dc of field2 by field1

0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

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

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...