How to make units dynamic?

  • What are you trying to achieve?

I would like the units of a summary metric to be dynamic enough to show one unit if the value is smaller, and another if larger. In my particular example the metric is distance and I’d love “feet” for smaller distances and “miles” for larger distances"

This is similar to how duration metrics are shown; the unit varies between seconds, minutes, hours, days depending on the value itself.

Is it possible to do this using a distance metric?

I have attached a screenshot of my Stat panel. The “distance traveled” variables are the ones I’d like to show in miles when the values are over, say 3000 feet.

Hi @pollymangan,

Welcome to the :grafana: community support forums !!

We are excited that you joined our OSS community. Please read about some of the FAQs in the community :slight_smile:

I don’t think that this is possible and also depended on the DataSource. Which DataSource you are using as a question seems more related to it if that is supported in that to allow selection somehow (e.g. InfluxDB)