Show sum of sums after group by - Grafana Elasticsearch

Hello,

I would like that Grafana shows me a sum (or a total) of all the sums that are created after the group by. Is that possible? I wanted to do that with another query but it is not implemented yet. Maybe there is a another way.

Furthermore I must do the groups by. If I don’t do that my data will not be accurate. The purpose of the groups by is to get the last version of each document in my database and then to do the sum on these last versions.

Here is my Grafana dashboard with my query:

prob_grafana_v2_0

Thank you

It seems to not be possible at the moment. - Closed

may be something like this? (sum of group by entity_id values)

select sum(*) from (SELECT last(“value”) FROM “autogen”.“W” WHERE timeFilter GROUP BY time(__interval), “entity_id”) where timeFilter GROUP BY time(__interval)