Table: show tags as columns

Hello,

I use Grafana 9.3.6 with InfluxDB 2.6 and want to show some data as a table.

In Influx the table looks like this:

My query is realtively easy:
from(bucket: “production-30days”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “garkammernve”)
|> filter(fn: (r) => r[“kammer”] == “GK2”)
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
|> yield(name: “last”)

Now I want to have this table in Grafana but my table looks like this:

How can I add the tags “kammer” and “Artikel” as additional columns? I didn’t find anything on the web so I think this should be easy, but I don’t know in which direction I have to search.

Thanks for your help
Manuel

I found the missing piece: group()
With |> group(columns: [“_time”, “Artikel”, “kammer”, “_value”], mode: “except”) it looks the way I want it to look.

Best regards
Manuel

1 Like