Dashboards & Visualizations

0 instead empty

jip31jip31
Explorer

hi

i use this request in a Dashboard
but when the result = 0 i dont have 0 displaying but Nothing
i would like to ,have 0
how to do please?
thanks

index="*" DisplayName="PCServicesWinSrv" Started="false" State="Stopped" | dedup host | stats count by DisplayName | eventstats sum(count) as Total | eval percent=round((count/Total)*100,1) | eval DisplayName=DisplayName."(count: ".count.", percent: ".percent.")" | table count

Tags (1)
0 Karma
1 Solution

krishnab
Path Finder

Hi it is simple try this,

your search
| eval count=if(isnull(count),"0",count)
| table count

View solution in original post

0 Karma

jip31
Motivator

thank you very much

0 Karma

jip31
Motivator

thanks a lot!!!!!!

0 Karma

niketn
Legend

@jip31 if one of the answers has helped you, please do not forget to accept the same to mark this question as answered!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

Sukisen1981
Champion

Splunk gives you the fillnull function to do this instead of writing an eval statement(which also should work) -

your search | fillnull value=0 count
0 Karma

krishnab
Path Finder

Hi it is simple try this,

your search
| eval count=if(isnull(count),"0",count)
| table count

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...