I mentioned in my last post about a common issue that I have with the stats command: items with empty values are simply excluded from the results. What if you want to include those empty results with the stats command?
The solution, which I found here, is to use the fillnull command.
<search query> | fillnull value=”-” | stats count by <field(s) which contain empty values>
It’s that simple! Now instead of excluding empty results, they are included and display as a dash. Brilliant.