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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...