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.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...