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!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

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