Splunk Search

Reverse data table to horizontal

isac_santana
Explorer

Guys, good morning

I'm having trouble inverting this table below. I need to leave the horizontal "key_type" information, and the "sync_status" information on the bottom line. does anyone know how i can do this?


Current:

| eval last_successful=strftime(strptime(last_successful_sync, "%F %T"), "%d/%m/%Y")
| eval sync_status=if(sync_status == "t", ":gmud-approved:"." "."Sucesso", ":x-negative:"." "."Falhou"." -- "."Last Successful: ".'last_successful')
| stats c as _c by key_type sync_status

isac_santana_0-1689607479965.png



How I need it to look:

EVPCPFCNPJEMAILPHONE
'sync_status''sync_status''sync_status''sync_status''sync_status'
Labels (4)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Add this line:

| chart values(sync_status) as sync_status by _c key_type

The assumption here is that each key_type only has one sync_status

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Add this line:

| chart values(sync_status) as sync_status by _c key_type

The assumption here is that each key_type only has one sync_status

Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...