Splunk Search

How to transpose or untable one column from table with 3 columns?

sarit_s
Communicator

Hello
I have a table with 3 columns : 

 

DomainEnvironemnt%of deployments
helloqa12
hello1dr13
hello2prod13
hello3dev15

 

And I would like to achieve this..

Domainqadrdevprod
hello12131415
hello11234
hello23246
hello31357


While the numbers in the cells are the % of deployments for each environment and domain

I've tried this but it is not working as expected :

| eventstats count by SERVERS 
| eventstats dc(SERVERS) as Total_Servers by Domain Environment

| eventstats dc(SERVERS) as Total_Servers
| eval "% Of deployments by domain&env" = (Deployed_Servers/Total_Servers)*100
| search Sprint!=*required AND Sprint!=*deleted* AND Sprint!="?"

| eval SH_{Environment}=count
| eventstats values(SH_*) as * by Domain
| dedup Environment Domain 

| table Domain SH* "% Of deployments by domain&env"
| rename SH_dr as DR SH_production as Production SH_qa as QA SH_staging as Staging
Labels (1)
Tags (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

Are you just making up numbers in the example?  You have four numbers in first table, but 16 in the second.  There is no logic between the two.

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