I have JSON formatted data in event as below:
{
"stats":
[
{"name":"Facebook", "count":50},
{"name":"yahoo", "count":80},
{"name":"gmail", "count":0},
{"name":"hotmail", "count":8}]}
For each stats.name, I want to get Top 2 max count and show in Bar or Column graph.
I am using following search:
...| rename stats{}.name AS Category, stats{}.value AS Value | stats sum(Value) BY Category
Above search gives same count for each stats.name.
for ex:
Name Count
Facebook 138
yahoo 138
gmail 138
hotmail 138
but i want result like:
Name Count
Facebook 50
yahoo 80
Thanks in Advance
... View more