Splunk Search

Transposing a table with _time as header and grouping the results

dojiepreji
Path Finder

Hello all,

I currently have a search that produces the following output:

alt text

This is the result of multiple append and join columns.

I would like to transpose the table to this:
alt text

I've tried to use | transpose, but I simply couldn't get it to appear the way I want it. The whole data for Level 1 disappears.

Can anybody please point me in the right direction?

0 Karma
1 Solution

Sukisen1981
Champion

try this

|eval {_time}=performance|fields - time,- performance|stats values(20*) by critname|rename values(* as ""* , *) as *""

you can also refer to my eaelier answer here on something similar if this does not give you the exact output - https://answers.splunk.com/answers/769617/how-to-extract-values-from-field-and-use-it-as-col.html#an...

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi dojiepreji,
did yu checked the possibility to use chart command?
something like this

| index=my_index
| bin span=1y _time
| chart count over critName BY _time

Ciao.
Giuseppe

0 Karma

Sukisen1981
Champion

try this

|eval {_time}=performance|fields - time,- performance|stats values(20*) by critname|rename values(* as ""* , *) as *""

you can also refer to my eaelier answer here on something similar if this does not give you the exact output - https://answers.splunk.com/answers/769617/how-to-extract-values-from-field-and-use-it-as-col.html#an...

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 ...