Splunk Search

How to make the value to be column

chrismok
Path Finder

Hi All,

I remember that Splunk has a command to make the value to column but I forgot it. Anyone remember?

Here the example.

The log file looks like that

Mary.score=65
Tom.score=90
Amy.score=100
Cammi.score=20

For the result, you can see the result that the name will be moved as column name

Mary  |  Tom  | Amy  | Cammi
===========================
65      90     100       20
Tags (1)

kml_uvce
Builder

Try this

...|chart values(Mary_score) AS Mary values(Amy_score) AS Amy values(Tom_score) AS Tom values(Cammi_score) AS Cammi

kamal singh bisht
0 Karma

kml_uvce
Builder

is this working for you ?

kamal singh bisht
0 Karma

chrismok
Path Finder

Yes, but it is quite hard code....

0 Karma

somesoni2
Revered Legend

Transpose command would work for you if there is only 1 row.

Try this.

Your search producing above output | eval key=1 | untable key name score | fields - key

pradeepkumarg
Influencer
0 Karma

chrismok
Path Finder

Hi gpradeepkumarreddy,

This command do not able to make my result.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...