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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...