Splunk Search

passing table column value as new column header

dgadjov
Explorer

I'm trying to make a table that has one of the column headers to have the value as the most occurring value in another column. I want to do something similar to this:

..| rename columnX as [stats mode(columnY)]
Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

In general you can do things like this:

| stats count | rename count as [stats count | return $count]

Note though, the subsearch does not use any info from the surrounding search, you will have to retrieve that from within the subsearch.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

In general you can do things like this:

| stats count | rename count as [stats count | return $count]

Note though, the subsearch does not use any info from the surrounding search, you will have to retrieve that from within the subsearch.

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...