Data Explorer showing multiple curves

I’m afraid it is a dumb question … Would someone will be so kind and explain me why do I have such a mess in Data Explorer, even if i choose one measurement/device_id/_field? I’m expecting to get graph with single curve, which will show temperature. Instead, I have multiple curves of different colours.

Flux query:
from(bucket: “my_DB”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “ra_milesight”)
|> filter(fn: (r) => r[“device_id”] == “milesight_sensor”)
|> filter(fn: (r) => r[“_field”] == “temperature”)
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
|> yield(name: “last”)

Thank You a lot.

Hello @Roberto69
Thats not a stupid question thatnks for asking.
So What I like to do is click the view raw data button and take a look at my raw data.
This will show you every table that you have. Every table will graph as a new line.
So you can see what columns are part of the group key.
In other words if you had a tag called “mytag” with values “a” “b” and “c” and it shows that "my tag is part of the group key, then flux is creating tables based off of “mytag” values so you can expect to have 3 tables.

If you want something not to be part of the group key you group your data together.

|>group(columns: ["mytag"])

If you want to group all of your data together you do:

|> group()

So right now it appears as though you have 6 tables. So my guess is some tag is causing this. I hope that helps.

Hi @Anaisdg

Thank you for fast response. You’re perfectly right. I’ve had wrong structure of payload. There was one data type defined as tag instead as field. I’ve moved it and now is fine. Thank you for the hint with view raw data button, also - it tells more as it looks at first.

1 Like

Hello @Roberto69 no problem!
Ps what are you doing with InfluxDB? I’m always curious to learn about users use cases.

Hello @Anaisdg,
we’re using InfluxDV together with mosquito, NodeREd and Grafana mostly for test and demonstration of our use cases. Cases are from various area, beggining from simple temperature measurement high in the mountains, to showing degree of availability of LoRaWAN gateways. InfluxDB is perfect for this purposes, just migration from 1.8 to 2.0+ was a bit painful.