Splunk Search

How to remove zeros from appearing on my stacked column chart?

chintan_shah
Path Finder

I am trying to get a stacked column chart with items sold by agent at each location.

I have the below search:

stats count by "Locations","Emp_Name" |chart sum(count) over "Locations"  by  Emp_Name where top20.

In this case, the chart is showing with the stack values, but also shows 0 in between the stacks.

HattrickNZ
Motivator

Maybe you need to manually remove/add the columns you desire fields - colnames?

0 Karma

sundareshr
Legend

Try this

stats count by "Locations","Emp_Name" | where count>0 |chart sum(count) over "Locations"  by  Emp_Name
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...