Splunk Search

How to transpose a table by id?

simo
Path Finder

Hi All,

I have a table similar to the following

idtime
12021-03-03 13:52:53.158
12021-03-03 13:52:53.001
12021-03-03 13:52:52.987
22021-03-03 11:59:50.950
22021-03-03 11:59:50.655
22021-03-03 11:59:50.631

 

the result I would like to achieve is

 

idtime1time2time3
12021-03-03 13:52:53.1582021-03-03 13:52:53.0012021-03-03 13:52:52.987
22021-03-03 11:59:50.9502021-03-03 11:59:50.6552021-03-03 11:59:50.631

 

it's possible? Thank you for any help

Simone

Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| makeresults | eval _raw="id	time
1	2021-03-03 13:52:53.158
1	2021-03-03 13:52:53.001
1	2021-03-03 13:52:52.987
2	2021-03-03 11:59:50.950
2	2021-03-03 11:59:50.655
2	2021-03-03 11:59:50.631"
| multikv forceheader=1
| fields - _* linecount


| streamstats count as timecount by id
| eval timecount="time".timecount
| xyseries id timecount time

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| makeresults | eval _raw="id	time
1	2021-03-03 13:52:53.158
1	2021-03-03 13:52:53.001
1	2021-03-03 13:52:52.987
2	2021-03-03 11:59:50.950
2	2021-03-03 11:59:50.655
2	2021-03-03 11:59:50.631"
| multikv forceheader=1
| fields - _* linecount


| streamstats count as timecount by id
| eval timecount="time".timecount
| xyseries id timecount time
0 Karma

simo
Path Finder

Thank you 🙂 I managed to solve

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...