Query to type to obtain count of the column values

Totally new in this filed. newbie alert.

I have a elastic search data source connected to grafana and i have a Statuscode column which has values like 0 404 405 999 and many more …i need the count of all the values other that 0…like if 3 values are 0 are other 7 values are 404 405 999 905 201 202 234 then the count has to be 7…and have to display it in graph panel

  • i have typed like this query field and got all data with value 404

when i type like this its not giving the data with 0 values thats ok but it is not even giving values in which 0 is included like 404 405 901 and all

can any one please help with the query to type to meet the requirements and also any other to ways to solve it.

Thanks in advance.

Hi @venkatrohit88

Is this strictly about an elastic query? You might get better help with writing elastic queries in the elastic forum.