Dashboards & Visualizations

Embedded Pie Chart Needs to Show Zero Results

mistydennis
Communicator

I have an embedded pie chart where I'm trying to show something rather than "no results found" with the red exclamation mark, and this is making people think the report isn't working. I've tried several methods to address this, but I can't get the results I would like.
 
Query and results:

| inputlookup my_lookup 
| search Exposure=External 
| stats count by Status 
| eval pie_slice = count + " " + Status 
| fields pie_slice, count

 
Screenshot 2023-02-23 103439.jpg

Is it possible to add something to the query so that when there are zero results I get this?
Screenshot 2023-02-23 104044.jpg

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The appendpipe command usually is used in this case.

| inputlookup my_lookup 
| search Exposure=External 
| stats count by Status 
| appendpipe [ stats count as Count | eval Status="No results",count=1 | where Count=0 | fields - Count ]
| eval pie_slice = count + " " + Status 
| fields pie_slice, count

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The appendpipe command usually is used in this case.

| inputlookup my_lookup 
| search Exposure=External 
| stats count by Status 
| appendpipe [ stats count as Count | eval Status="No results",count=1 | where Count=0 | fields - Count ]
| eval pie_slice = count + " " + Status 
| fields pie_slice, count

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

[Puzzles] Solve, Learn, Repeat: Nested loops in Event Conversion

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Your Guide to Splunk Digital Experience Monitoring

A flawless digital experience isn't just an advantage, it's key to customer loyalty and business success. But ...