How two visualize two queries with a single line

I have a graph that visualises weight, body fat and muscle mass.

At the begin of september, I had to change the data location of the data in the database. So I now have two queries per value. Example for body fat:

Pre- and post-september query:

When I give the two the same color, it almost looks like it’s one line. Is there any way to display the old and the new data from the two queries together in one line?

Welcome to the Grafana forum.

It looks like both of your queries (pre- and post-September) are querying the same InfluxDB? If yes, then I think you could edit your query’s FROM and WHERE statement to include the multiple entity_ids, domains, etc. So maybe first duplicate your panel where you can play around with, and then delete one of the queries, and then try to write both as one query? You can post your question on the InfluxDB forum and may get a faster response.

Thanks for your answer!

if just selecting from two tables in one query, they are still displayed as two lines. Maybe because of the different table names which result in different names for the values? (kg.mean vs state.mean)

I think I have an idea…How about keeping all your queries intact and then using a Transform to add the two? They never overlap, because when one time series stopped, the next one continued, correct?

1 Like

Thank you! That works so far - but only for one value. If I use it to convert the body fat to a line, for example, it works.

The problem is that when I select “Replace all fields”, I can’t do the same with Muscle Mass and Metabolic Age, since their fields have been replaced as well. And without “Replace all fields” I have a chaotic view, because all values are in there :-/

Doing this did the trick:

Without you, I would not have found this possibility :slight_smile:

Thanks @grant2 for your advises. Without you, I would not have found this possibility :slight_smile:

Yep, you got it. Please mark the above as Solution so others can find it in the future.

I was just going to suggest doing multiple Transformations, like this:

1 Like