Hello, First, I am aware that there are multiple posts regarding my question, but I can't seem to use them in my scenario. Please see an example below. There are two fields, location and name. I ne...
See more...
Hello, First, I am aware that there are multiple posts regarding my question, but I can't seem to use them in my scenario. Please see an example below. There are two fields, location and name. I need to filter out name that contain "2" and stats count name based on location. I came up with this search, but the problem is it did not include location A (because the count is zero) Please suggest. I appreciate your help. Thanks | makeresults format=csv data="location, name
location A, name A2
location B, name B1
location B, name B2
location C, name C1
location C, name C2
location C, name C3"
| search name != "*2*"
| stats count by location Data location name location A name A2 location B name B1 location B name B2 location C name C1 location C name C2 location C name C3 Expected output: location count(name) location A 0 location B 1 location C 2