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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...