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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...