Splunk Search

How to pivot results table?

vinod0313
Explorer

vinod0313_0-1597755551180.png

I got above result from my splunk query:  index="cx_aws" source="notifications-service"|stats count by tokenValidatorInfo,requestValidationRequired,requestPayloadValidationRequired,responsePayloadValidationRequired,aopUsed|rename tokenValidatorInfo as "TOKENVALIDATION"|rename requestValidationRequired as "REQUESTVALIDATION"|rename requestPayloadValidationRequired as "REQUESTPAYLOADVALIDATION"|rename responsePayloadValidationRequired as "RESPONSEPAYLOADVALIDATION"|rename aopUsed as AOP|fields TOKENVALIDATION,REQUESTVALIDATION,REQUESTPAYLOADVALIDATION,RESPONSEPAYLOADVALIDATION,AOP



But i want the result sholud be like below

TOKENVALIDATION:true
REQUESTVALIDATION:false
REQUESTPAYLOADVALIDATION:false
RESPONSEPAYLOADVALIDATION:true
AOP:false


could anyone help me?

Labels (1)
0 Karma

impurush
Contributor

Hi @vinod0313 

You can use |transpose function at the end of your query and it will transpose all the x-axis into the y-axis.

0 Karma
Get Updates on the Splunk Community!

Developer Spotlight with Brett Adams

In our third Spotlight feature, we're excited to shine a light on Brett—a Splunk consultant, innovative ...

Index This | What can you do to make 55,555 equal 500?

April 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...