Splunk Search

Splunk search to group by the field values

soujanya
New Member

Hi,

I need to assign the values of a field to a new field and group with the new field.

For ex. 

Field-1  Field2

AppA     xxxx

AppA    yyyy

AppA    zzzz

AppB    xxxx

AppB     yyyy

I want to be able to have a stats count with a new field or value for everything that is there with a combination of Field1 and Field2.  i.e in the above result the new search field 3 may be should return 3 and 2 for each apps. 

I was told this might be achieve-able through lookup definitions and tables , but I am new to it. 

Any help will be great. 

 

Labels (5)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| stats dc(field2) as field3 by field1
0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...