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
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...