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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...