Hey all,
I am new in grafana. My datasource is elasticsearch and it contianed a field which is array of jsons (each json has code, description and amount as keys), i want for each description to sum the amount and i cant get this now.
in my mapping this field is nested.
can anyone help with it?
thanks
@idanconley
Is the data something like this?
“TVChannels”: [
{
“channel”: 154
},
{
“channel”: 153
},
{
“channel”: 141
},
{
“channel”: 126
},
{
“channel”: 114
},
{
“channel”: 101
}
],
like this:
“TVChannels”: [
{
“channel”: 154
“amount”: 1
},
{
“channel”: 153
“amount”: 3
},
{
“channel”: 141
“amount”: 5
},
{
“channel”: 126
“amount”: 10
},
{
“channel”: 114
“amount”: 7
},
{
“channel”: 101
“amount”: 12
}
],
Do you want to filter it dynamically based on a drop down?
you could do
TVChannels.channel: $channel
or based on a static value
TVChannels.channel: 101
i want to sum the amount group by channel
and what would the final result look like when plotted on what kind of visual?
Sorry what I was asking was what kind of visual are you plotting this on?