How to change the labels and color of the gauge panel?

what is your data source> mysql?

no, I use AWS timestream

Looks like you have opened another thread about this.

For me it is not the same?
Here I need the query without a “time series” correct? Completely different problem or do I miss something? If you think it is the same please let me know.

1 Like

For that I would recommend you ask that question on an AWS timestream forum or look at the documentation for it as it is not a grafana related issue.

But as an example in Microsoft SQL Server there is this function

			PARTITION BY soldDate --divides the products into partitions by soldDate
			ORDER BY soldDate DESC --orders those partitions by soldDate

which gives you same product sold on same date and then ranks those rows so that you have the following

foo,2023-06-06 10:00,1
foo,2023-06-06 09:00,2
foo,2023-06-06 08:00,3

Then you select the item with the lowest rank to find the earliest of the sales date for foo.

select * from (ranking) where rank = 1
--gives you
foo,2023-06-06 10:00,1

This would work for all other products. Try to find the same function or way of doing this in aws stream querying.

Thank you:
I found the answer here: Effective queries for common query patterns in Amazon Timestream | AWS Database Blog

My query looks like this now:

SELECT sensor_id
	,max_by(time, time) AS time
	,max_by("measure_value::double" , time) AS value
FROM "sensordb"."ruesselsheim" 
WHERE "measure_value::varchar" IS NULL and 
sensor_id IN (
GROUP BY sensor_id

I removed the transform now. But I do not understand how to display for each sensor a gauge?

Currently the sql response and my gauge looks like that:

Where is the magic happening now to display for each sensor one gauge? :slight_smile:

Wait! I selected all values now and see 4 different gauges.

How can I change the color for each gauge now?

With the value-mapping i was able to rename the labels. But the color which i have changed there is not effecting my gauge. Why?

look back in all the threads. there you will find your answers young jedi, use the force

Do you mean the “value mapping” or something else?

Marking this thread as solved. For reference @phil, you can modify the color via the value mapping panel.

Note, this only works for values and not for the name (e.g. sensor name). If you want to color the guages per sensor I would suggest creating individual guage panels for each sensor and using the Single Color color scheme.