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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...