# Can I use a Merge transform to replace field NAMES instead of their values?

**URL:** <https://community.grafana.com/t/can-i-use-a-merge-transform-to-replace-field-names-instead-of-their-values/87492>\
**Category:** Dashboards\
**Created:** [May 11, 2023, 4:09pm UTC](https://community.grafana.com/t/can-i-use-a-merge-transform-to-replace-field-names-instead-of-their-values/87492 "2023-05-11T16:09:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyroper22](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@tyroper22](https://community.grafana.com/u/tyroper22)\
**Post date:** [May 11, 2023, 4:09pm UTC](https://community.grafana.com/t/can-i-use-a-merge-transform-to-replace-field-names-instead-of-their-values/87492/1 "2023-05-11T16:09:08Z")

</div>

I’m querying Azure logs to retrieve some API request data, broken down by client. Here, each of the numbered headers are a Client ID.

**QUERY A**

```auto
+--------------------+-----+-----+----+
| Performance Bucket | 1 | 2 | 3 |
+--------------------+-----+-----+----+
| <250ms | 503 | 325 | 43 |
+--------------------+-----+-----+----+
| 250ms-500ms | 244 | 31 | 7 |
+--------------------+-----+-----+----+
| 500ms-1s | 17 | 4 | 0 |
+--------------------+-----+-----+----+

```

I also have a table that links Client ID to Client Name:

**QUERY B**

```auto
+----+----------------+
| Id | Name |
+----+----------------+
| 1 | Pet Mart |
+----+----------------+
| 2 | John's Burgers |
+----+----------------+
| 3 | Retail Supply |
+----+----------------+

```

It’s fairly trivial to replace the ID with a Name in the _values_ (using a Merge), however, in this unique case, I need to replace the field _name_ (the table headers). My goal is the following:

**DESIRED OUTPUT**

```auto
+--------------------+----------+----------------+---------------+
| Performance Bucket | Pet Mart | John's Burgers | Retail Supply |
+--------------------+----------+----------------+---------------+
| <250ms | 503 | 325 | 43 |
+--------------------+----------+----------------+---------------+
| 250ms-500ms | 244 | 31 | 7 |
+--------------------+----------+----------------+---------------+
| 500ms-1s | 17 | 4 | 0 |
+--------------------+----------+----------------+---------------+

```

Is there a way to achieve this?
