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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...