Splunk Search

Expand column in to rows

teewenjie22
Engager

How to Convert 

_time             ColumnA                  ColumnB 
timeA             10                                20

into 

_time             Fields           Value
TimeA            ColumnA    10
TimeA            ColumnB    20

Labels (2)
0 Karma
1 Solution

tread_splunk
Splunk Employee
Splunk Employee
index=_internal 
| timechart count span=1h by sourcetype limit=5 useother=f partial=f 
| untable _time sourcetype count

The first 2 lines are to create some data.  You want the untable command in line 3.  Super useful!  (Coupled with xyseries to do the reverse).

View solution in original post

0 Karma

tread_splunk
Splunk Employee
Splunk Employee
index=_internal 
| timechart count span=1h by sourcetype limit=5 useother=f partial=f 
| untable _time sourcetype count

The first 2 lines are to create some data.  You want the untable command in line 3.  Super useful!  (Coupled with xyseries to do the reverse).

0 Karma

teewenjie22
Engager

Thanks you So much

Tags (1)
0 Karma

tread_splunk
Splunk Employee
Splunk Employee
index=_internal 
| timechart count span=1h by sourcetype limit=5 useother=f partial=f 
| untable _time fields value

This might make things clearer.  You can use any value you like where I've used _time, fields & value for the new column headings / field names.

0 Karma
Get Updates on the Splunk Community!

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...

Stay Connected: Your Guide to October Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...