Splunk Search

transpose xyseries not helping

mukulraghuram
New Member

Need to transform like this. Please help.

Before:

  Col1----Col2
Name1----   a
    ------------b
--------c

After:`

Col1    Col2    Col3    Col4
Name1   a   b   c
Tags (2)
0 Karma

to4kawa
Ultra Champion
| makeresults 
| eval _raw="col1 col2
Name1 a
      b
      c" 
| multikv forceheader=1
| table col1 col2
| eval tmp=mvappend(col1,col2)
| stats list(tmp) as tmp
| mvexpand tmp
| streamstats count
| eval cols="col".count
| xyseries count cols tmp
| eval count=1
| stats values(*) as * by count
| fields - count

It's not easy.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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