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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...