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!

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Deprecation of Splunk Observability Kubernetes “Classic Navigator” UI starting ...

Access to Splunk Observability Kubernetes “Classic Navigator” UI will no longer be available starting January ...

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...