Hi Mike6960,
read this answer https://answers.splunk.com/answers/176466/how-to-use-eval-if-there-is-no-result-from-the-bas-1.html to learn how you can handle empty search results.
Update:
take a look at this run everywhere example, yes it uses makeresults but only to create fake events 😉
| makeresults `comment("Let build some fake events ...")`
| eval _raw="company,tesco|count,100|count,200|count,0|count,300"
| extract pairdelim="|", kvdelim=",", mv_add=true, limit=0
| mvexpand count
| table _time company count `comment("This is where the fun starts ...")`
| streamstats current=f last(count) AS l_count by company
| eval show_on_no_results=case(count="0", l_count,count!="0", null())
The important SPL command is the streamstats which will take the last known number and then you can use this last number and display it when the actual result is 0 😉
Hope this helps ...
cheers, MuS
... View more