How to get _value of two tables into one table?

Hey there,

I’m trying to create a dashboard where i can filter data by gas station location and fuel type.
This is my Table from this query:

from(bucket: "homeassistant")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["entity_id"] == "tankerkoenig_aral_tankstelle_bat_waldmohr_e5")
  |> filter(fn: (r) => r["_field"] == "city_str" or r["_field"] == "value")
  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
  |> yield(name: "last")

How can i get the _value of _field “city_str” and the _value of the _field “value” into one table so i can query the location and the price at the same time within grafana?

Hi @Fernien,
Welcome to the community :slight_smile:!
You can try using the group() function. Perhaps in your case group by either domain or entity_Id.