Dashboards & Visualizations

Single value visualization showing output as "N/A" instead it should show 0

mprreddy51
Explorer

Hi,

I have single value visualization if i select for 24 hrs or any other time i am getting results example: 50
If i select for 15 min or less than a hour it is showing output as: "N/A". I want to show the output result as "0" if there are no results instead of N/A

Thanks,
PR

0 Karma
1 Solution

somesoni2
Revered Legend

Try like this

your base search | search STATUS = D OR STATUS = A| stats sum(STATUS_COUNT) as count | appendpipe [| stats count | where count=0]

View solution in original post

somesoni2
Revered Legend

Try like this

your base search | search STATUS = D OR STATUS = A| stats sum(STATUS_COUNT) as count | appendpipe [| stats count | where count=0]

mprreddy51
Explorer

Thanks Somesh.

|rename STATUS_COUNT as sumation |appendpipe [ stats count | eval sumation=if(count==0,0,NULL)|fields - count] this i used working fine

0 Karma

shaskell_splunk
Splunk Employee
Splunk Employee

What does your search look like? If you're doing a simple '| stats count' it should return 0 if you have no results during the selected time period.

0 Karma

mprreddy51
Explorer

Hi,

My query ends with "| search STATUS = D OR STATUS = A| stats sum(STATUS_COUNT)

but no luck

0 Karma

nswondem
Path Finder
0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...