# Referencing values from multiple elements

**URL:** <https://discuss.elastic.co/t/referencing-values-from-multiple-elements/266756>\
**Category:** Kibana\
**Created:** [March 9, 2021, 11:49pm UTC](https://discuss.elastic.co/t/referencing-values-from-multiple-elements/266756 "2021-03-09T23:49:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tangkalo](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@tangkalo](https://discuss.elastic.co/u/tangkalo)\
**Post date:** [March 9, 2021, 11:49pm UTC](https://discuss.elastic.co/t/referencing-values-from-multiple-elements/266756/1 "2021-03-09T23:49:30Z")

</div>

Hi, is it possible to reference column values from two different datatables. What I would like to do is to use the values from the separate tables to calculate a new value and then use it in a separate element. If not, is there way to work around this limitation? (it appears union is not supported in canvas)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [March 10, 2021, 3:01am UTC](https://discuss.elastic.co/t/referencing-values-from-multiple-elements/266756/2 "2021-03-10T03:01:52Z")

</div>

See if this helps

> **[Joining queries | Elasticsearch Reference \[7.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/joining-queries.html)**

---

<div class="post-metadata">

**Author:** ![tangkalo](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@tangkalo](https://discuss.elastic.co/u/tangkalo)\
**Post date:** [March 10, 2021, 3:23am UTC](https://discuss.elastic.co/t/referencing-values-from-multiple-elements/266756/3 "2021-03-10T03:23:28Z")

</div>

Unfortunately we are still using 7.5 which doesn't seem to support joining queries. In addition, it doesn't appear that I can use DSL inside Kibana Canvas. I couldn't find a place(except filters in Discover) where I can inject this type of syntax. Please correct me if I am wrong. Thanks for the suggestions, Anyway.

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [March 10, 2021, 3:34am UTC](https://discuss.elastic.co/t/referencing-values-from-multiple-elements/266756/4 "2021-03-10T03:34:33Z")

</div>

OK. Sorry, missed the canvas bit.  
Can you give an example of your data and required output?

---

<div class="post-metadata">

**Author:** ![tangkalo](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@tangkalo](https://discuss.elastic.co/u/tangkalo)\
**Post date:** [March 10, 2021, 4:26am UTC](https://discuss.elastic.co/t/referencing-values-from-multiple-elements/266756/5 "2021-03-10T04:26:57Z")

</div>

Np. I should have stated more clearly.

Below is an example on the data though it's be simplified for discussion.

I have 5 markdowns that shows the latest status for each data source(site).

The overall status, represented using an image, is dependent on the statuses of these five sites. e.g. if anyone of them has error, the overall status value will be error.

My question is - is there a way I can reference the status values from the 5 markdowns to determine the one for this image?

| Source | timestamp | Status |
| --- | --- | --- |
| site1 | 8:00 AM | ok |
| site2 | 8:02 AM | ok |
| site3 | 8:04 AM | warn |
| site1 | 8:05 AM | error |
| site4 | 8:06 AM | error |
| site3 | 8:07 AM | ok |
| site2 | 8:08 AM | warn |
| site5 | 8:09 AM | ok |

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 7, 2021, 4:27am UTC](https://discuss.elastic.co/t/referencing-values-from-multiple-elements/266756/6 "2021-04-07T04:27:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
