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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...