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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...