# How to add units to a timeseries panel with dynamic metrics sourced from DynamoDB

**URL:** <https://community.grafana.com/t/how-to-add-units-to-a-timeseries-panel-with-dynamic-metrics-sourced-from-dynamodb/161967>\
**Category:** Dashboards\
**Tags:** transformations\
**Created:** [March 5, 2026, 7:23am UTC](https://community.grafana.com/t/how-to-add-units-to-a-timeseries-panel-with-dynamic-metrics-sourced-from-dynamodb/161967 "2026-03-05T07:23:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike1c34](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mike1c34](https://community.grafana.com/u/mike1c34)\
**Post date:** [March 5, 2026, 7:23am UTC](https://community.grafana.com/t/how-to-add-units-to-a-timeseries-panel-with-dynamic-metrics-sourced-from-dynamodb/161967/1 "2026-03-05T07:23:41Z")

</div>

Hi all,

I am using Cloud Hosted Grafana (v13.0) and my data source is DynamoDB.

I have a simple dashboard with a multi-value variable (30 options) where the user can select some metrics to plot on a timeseries chart. This works fine.

I have a separate DynamoDB table which contains a list of all the available metrics and their corresponding units, for example Room\_Temperature : degC, Rain\_Guage : mm, Wind\_Speed : km/h and so on. It’s a ‘lookup table’.

At the moment, when I select some metrics from the drop-down variable I can see all the series on the panel but they are all plotted on the same Y-axis and I don’t have any units displayed. I would like to display the units on the Y-axis, and ideally have a new Y-axis for each unit type.

It sounds so simple but I have had no success. I realise I could add 30 static overrides but this doesn’t seem like a good strategy. I would like to use a transformation (or similar) like the “Config from query results” which I believe can do this but I can’t get it to work. When I add that transformation I have only “A” as my Config Query Option. If I create a 2nd query (B) to fetch the units from DyanmoDB, I can’t see this query in the transformation option.

If anyone has achieved this before I would much appreciate any advice.

Thanks

Mike

---

<div class="post-metadata">

**Author:** ![infofcc3](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/infofcc3/32/51248_2.png) [@infofcc3](https://community.grafana.com/u/infofcc3)\
**Post date:** [March 27, 2026, 5:50am UTC](https://community.grafana.com/t/how-to-add-units-to-a-timeseries-panel-with-dynamic-metrics-sourced-from-dynamodb/161967/2 "2026-03-27T05:50:58Z")

</div>

![image](https://us1.discourse-cdn.com/grafana/original/3X/4/1/415440c054ccb82e4d3c513f0231beadd92a6464.png)  
Unit show in tooltip when you hover on this (Use add field override property)  
 ![image](https://us1.discourse-cdn.com/grafana/original/3X/1/3/13dad315206bbc94b145b6173bacfdaaf5fed856.png)

---

<div class="post-metadata">

**Author:** ![mike1c34](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mike1c34](https://community.grafana.com/u/mike1c34)\
**Post date:** [March 27, 2026, 1:15pm UTC](https://community.grafana.com/t/how-to-add-units-to-a-timeseries-panel-with-dynamic-metrics-sourced-from-dynamodb/161967/3 "2026-03-27T13:15:48Z")

</div>

Thanks for the reply but this solurtion is not really practical in my situation as described in my post.

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [March 27, 2026, 2:09pm UTC](https://community.grafana.com/t/how-to-add-units-to-a-timeseries-panel-with-dynamic-metrics-sourced-from-dynamodb/161967/4 "2026-03-27T14:09:52Z")

</div>

Please provide sample data as csv inline here in the forum

```auto
metric,value,unit,datetime

```

or provide schema definitions DDL

```auto
Create table unit_types(Id,unitname)

```

```auto
Create table metrics(id,metric,value,unittypeid,datetime)

```

---

<div class="post-metadata">

**Author:** ![mamtabankoti4](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@mamtabankoti4](https://community.grafana.com/u/mamtabankoti4)\
**Post date:** [March 30, 2026, 5:34am UTC](https://community.grafana.com/t/how-to-add-units-to-a-timeseries-panel-with-dynamic-metrics-sourced-from-dynamodb/161967/5 "2026-03-30T05:34:31Z")

</div>

> [@mike1c34](#):
>
> Hi all,
> 
> I am using Cloud Hosted Grafana (v13.0) and my data source is DynamoDB.
> 
> I have a simple dashboard with a multi-value variable (30 options) where the user can select some metrics to plot on a timeseries chart. This works fine.
> 
> I have a separate DynamoDB table which contains a list of all the available metrics and their corresponding units, for example Room\_Temperature : degC, Rain\_Guage : mm, Wind\_Speed : km/h and so on. It’s a ‘lookup table’.
> 
> At the moment, when I select some metrics from the drop-down variable I can see all the series on the panel but they are all plotted on the same Y-axis and I don’t have any units displayed. I would like to display the units on the Y-axis, and ideally have a new Y-axis for each unit type.
> 
> It sounds so simple but I have had no success. I realise I could add 30 static overrides but this doesn’t seem like a good strategy. I would like to use a transformation (or similar) like the “Config from query results” which I believe can do this but I can’t get it to work. When I add that transformation I have only “A” as my Config Query Option. If I create a 2nd query (B) to fetch the units from DyanmoDB, I can’t see this query in the transformation option.
> 
> If anyone has achieved this before I would much appreciate any advice.
> 
> Thanks
> 
> Mike

Grafana can’t automatically create a separate Y-axis for each metric, but you can handle it efficiently by combining your metrics with the unit lookup table. This way, each series knows its unit, and you only need a few overrides, one per unit type instead of one per metric.

- Keep your main metrics query (Query A)
- Add a second query for the lookup table (Query B) with metric - unit
- Use the “Outer join” transformation to merge them on the metric name
- Create one Y-axis override per unique unit type (°C, mm, km/h, etc.)
- All metrics sharing the same unit will use the same Y-axis
