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!

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...

Observability protocols to know about

Observability protocols define the specifications or formats for collecting, encoding, transporting, and ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...