# Combine two measurements and plot in Grafana

**URL:** <https://community.influxdata.com/t/combine-two-measurements-and-plot-in-grafana/32472>\
**Category:** Grafana\
**Created:** [December 12, 2023, 6:05pm UTC](https://community.influxdata.com/t/combine-two-measurements-and-plot-in-grafana/32472 "2023-12-12T18:05:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MCSAntunes](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@MCSAntunes](https://community.influxdata.com/u/MCSAntunes)\
**Post date:** [December 12, 2023, 6:05pm UTC](https://community.influxdata.com/t/combine-two-measurements-and-plot-in-grafana/32472/1 "2023-12-12T18:05:36Z")

</div>

Hello, everyone! First poster here.

I’m using the Jenkins InfluxDB plugin to store metrics about my Jenkins instance and I’m trying to plot them using Grafana.

I want to combine two measurements and have one as the X axis of a bar chart, and the other as the Y chart.  
In the following example, I want to have the `build_number` as the X axis and the `build_time` measurement as the Y axis.  
What’s the best way to achieve this result? I’ve tried using the join() function, but I didn’t get the results I was expecting.

```auto
                   _start:time _stop:time _field:string _measurement:string build_result:string instance:string project_name:string project_namespace:string project_path:string _time:time _value:int
------------------------------ ------------------------------ ---------------------- ---------------------- ---------------------- --------------------------------------------- ---------------------- ------------------------ ------------------------- ------------------------------ --------------------------
2023-12-11T17:35:31.101733947Z 2023-12-12T17:35:31.101733947Z build_number jenkins_data FAILURE *** InfluxDB Test Test_folder Test_folder/InfluxDB Test 2023-12-12T13:31:58.113000000Z 14

------------------------------ ------------------------------ ---------------------- ---------------------- ---------------------- --------------------------------------------- ---------------------- ------------------------ ------------------------- ------------------------------ --------------------------
2023-12-11T17:35:31.101733947Z 2023-12-12T17:35:31.101733947Z build_time jenkins_data FAILURE *** InfluxDB Test Test_folder Test_folder/InfluxDB Test 2023-12-12T13:31:58.113000000Z 1784

```

Essentially I’m trying to convert this dashboard ([Jenkins Build Status | Grafana Labs](https://grafana.com/grafana/dashboards/10557-jenkins-build-status/)) to Flux and to the new InfluxDB plugin version.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![scott](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/scott/32/16492_2.png) [@scott](https://community.influxdata.com/u/scott)\
**Post date:** [December 13, 2023, 12:14am UTC](https://community.influxdata.com/t/combine-two-measurements-and-plot-in-grafana/32472/2 "2023-12-13T00:14:25Z")

</div>

@MCSAntunes Can you share the query you have? I don’t think it will be hard, but I want to make sure I know what you’re actually working with.
