I have a query to retrieve "Item_Number " in table. The results will be as below...
..| table Item_Number
Now, I want to calculate count for each of these "Item Number " .
I used below query to get the count .
|table Item_Number | map search="search index=* $Item_Number$|stats count as cnt"
but I am getting zero results .
Please suggest how to achieve this count for each result values of "Item_Number "
Thanks in Advance.
Yeah Vijeta, I even tried with fields and used the syntax that you shared . But did not helped me getting the count .
my query worked when I gave $$ItemNumber$$..
your answer "\"$ItemNumber$\"" also helped me when i had to use with eval ..like |eval ItemNo=\"$Item_Number$\"| ..
Thank you so much Vijeta.
Sorry for late reply.
Count of all instances of each value? If yes, try
| stats count by Item_Number instead of
stats generates values in such a way that you can use this search to power a table on a form/dashboard.