# Merge table columns with the same name

**URL:** <https://community.grafana.com/t/merge-table-columns-with-the-same-name/148857>\
**Category:** Dashboards\
**Created:** [April 24, 2025, 10:00am UTC](https://community.grafana.com/t/merge-table-columns-with-the-same-name/148857 "2025-04-24T10:00:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eedjeeze](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@eedjeeze](https://community.grafana.com/u/eedjeeze)\
**Post date:** [April 24, 2025, 10:00am UTC](https://community.grafana.com/t/merge-table-columns-with-the-same-name/148857/1 "2025-04-24T10:00:36Z")

</div>

I have a table like this:

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/1/d/1dbf240cd1094f31dbb6c989e7e5e8b2ec223e24.png)

And would like to merge all columns that have the same name while preserving time (the goal is to display this in a state timeline pannel)

Is there any way of doing this that would not need intervention if some other node (let’s say mysql10) were to appear ?

I’m using Grafana v11.6.0

---

<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:** [April 24, 2025, 10:23am UTC](https://community.grafana.com/t/merge-table-columns-with-the-same-name/148857/2 "2025-04-24T10:23:30Z")

</div>

Hello eedjeeze  
is this is your requirement???

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/5/2/5250590b9958bde6037511315a34d76aadcab9be.png)

---

<div class="post-metadata">

**Author:** ![eedjeeze](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@eedjeeze](https://community.grafana.com/u/eedjeeze)\
**Post date:** [April 25, 2025, 12:05pm UTC](https://community.grafana.com/t/merge-table-columns-with-the-same-name/148857/3 "2025-04-25T12:05:47Z")

</div>

Hello !  
This was indeed the right direction ! Thank you for the hint.  
I switched the transformation to Long time series and added the Merge series/tables transformation to get your result. After that I could partition by values using the member\_host field and got the result I wanted !

Here are my query and tranformations for anyone that wants to monitor Group Replication using data from the Prometheus mysqld\_exporter:

PromQL query :  
`max by(member_host, member_state) (mysql_perf_schema_replication_group_member_info{replication_set=~"$replication_set"})`

Transformations:

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/c/6/c67832b10765566aee997b7cb2a01dc17aeb3c73.png)

The result:

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/e/e/ee9a573bf324f4d390b8240a622948f92a9b5d08.png)

---

<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:** [April 29, 2025, 12:09pm UTC](https://community.grafana.com/t/merge-table-columns-with-the-same-name/148857/4 "2025-04-29T12:09:44Z")

</div>

> [@eedjeeze](#):
>
> This was indeed the right direction ! Thank you for the hint.

You’re very welcome!  
Glad to hear it helped—feel free to reach out if you need anything else. Happy dashboarding!
