Summarice data from several hosts

I have following query:
SELECT last(“physical_consumed”) *$CPUprice FROM “cpu_util” WHERE (“host” =~ /^HOST/) AND timeFilter GROUP BY time(__interval) fill(none)

Min time interval
Relative time
Time shift

I have a variable to choose hosts from.
What I’m looking for is to choose several hosts and summarice them into one.
I’ve tested it, but the result doesn’t get correct.
I created a question that do the cost so far/day. And I suspected it should do host1+host2…
But it seems as it takes the latest data from each. So if I have for example 11 hours it takes 6hours from the first host and 5 hours from the second host and so on.
I’ve tested Singelstat Math Panel, but that’s manual adding of hosts.
Is there anyone that might have a clue to solve it?

b reg Niklas

Please build the variable host that get all hosts, then choose All option, next, modify the query with WHERE host in host and GROUP BY Host, then put into Stat Panel and bring the Title in panel edit with {}

Fadjar Tandabawana

Hi Fadjar,
thanks for quick reply. I tried to do as you described but I don’t get it to work. The vaiables is no probelm, it’s the query itself. And I don’t really understand the part with “Title”. I’m not that good in db-questions, so I’ve actually done it with the GUI. I hope the pictures will be visable:

b reg Niklas