# Reporting on a single table form different queries

**URL:** <https://forum.inductiveautomation.com/t/reporting-on-a-single-table-form-different-queries/14491>\
**Category:** General Discussion\
**Created:** [June 9, 2017, 10:58pm UTC](https://forum.inductiveautomation.com/t/reporting-on-a-single-table-form-different-queries/14491 "2017-06-09T22:58:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 9, 2017, 11:50pm UTC](https://forum.inductiveautomation.com/t/reporting-on-a-single-table-form-different-queries/14491/2 "2017-06-09T23:50:26Z")

</div>

One approach, possibly easier in terms of maintenance, would be to just join the two queries together (eg with a `UNION` statement or something similar).

If that’s not an option for whatever reason, you can pull a specific row index (even dynamically) from another datasource while inside a table. I created a rather contrived example to demonstrate; datasource A is an ascending list of integers from 0 - 100, while datasource B is a list of descending numbers from 100 - 0. Within the table for A, I entered the following expression in the second column:  
`@B[Row - 1].Column B@`

Then you’re able to pull back the data at a specific index of datasource B based on the row you’re at in the table for A. A project export to better explain what I mean:  
[Keychain Index.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b1b9b123e162df2d826ef89864d271f42961b89a.proj) (17.5 KB)

---

_[View the full topic](https://forum.inductiveautomation.com/t/reporting-on-a-single-table-form-different-queries/14491)._
