Hello
I use the search below and I would like to do 2 different things
1) How to do for adding a word after the stats count (for example I would like to have "250 machines")
2) How to do for adding a word with condition after the stats count (for example I would like to have "250 machines" if number of host is >0 and "any machines" if host=0 )
| inputlookup host.csv
| stats count by host
Thanks
Try this:
| inputlookup host.csv
| stats count by host
| eval count = if(count == 0, "any machines", tostring(count) + " machines")
You can try that
| inputlookup host.csv
| stats count by host
| eval count = if(count > 0, count." machines","Any machines")
Let me know 🙂
Hi
try like
|stats count by host | eval count = if(count >0, count." "."machines", "any machines")
Try this:
| inputlookup host.csv
| stats count by host
| eval count = if(count == 0, "any machines", tostring(count) + " machines")
Thanks!!!!