Splunk Search

How to display field value into column?

Khuzair81
Path Finder

status=Auto, Manual

car= BMW, Honda, Audi

index * | stats count(status) as Total by car

Is there anyway I can get the results as shown in attached picture.

IMG_20220829_174714.jpg

 

 

 

 

 

Labels (1)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

Use chart, not stats

| chart count as Total over car by status

View solution in original post

yuanliu
SplunkTrust
SplunkTrust

For fun,  Splunk 9 allows a special mode in foreach that can be used for this purpose.

| stats count as Total by car status
| foreach mode=multivalue status
    [eval <<ITEM>> = if(isnull(Total), 0, Total)]
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Use chart, not stats

| chart count as Total over car by status
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Guided Onboarding with Auto-schema Is Now Generally Available

  We are excited to announce the General Availability of Guided Onboarding with Auto-Schematization ...

ATTENTION: We’re Moving! (AGAIN!)

The Splunk Community Slack is undergoing a system migration to keep our workspace secure and ...

Deep Dive: Optimizing Telemetry Pipelines in Splunk Observability Cloud

In this session, we will peel back the layers of Splunk Observability Cloud’s cost-optimization features. ...