# How to Populate a Power Table with SELECT Query and Tag Values

**URL:** <https://forum.inductiveautomation.com/t/how-to-populate-a-power-table-with-select-query-and-tag-values/99762>\
**Category:** Ignition\
**Created:** [December 12, 2024, 7:05pm UTC](https://forum.inductiveautomation.com/t/how-to-populate-a-power-table-with-select-query-and-tag-values/99762 "2024-12-12T19:05:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulm1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulm1/32/5900_2.png) [@paulm1](https://forum.inductiveautomation.com/u/paulm1)\
**Post date:** [December 12, 2024, 7:05pm UTC](https://forum.inductiveautomation.com/t/how-to-populate-a-power-table-with-select-query-and-tag-values/99762/1 "2024-12-12T19:05:07Z")

</div>

What is the best way to populate a Power table with a regular SELECT Query and "Join" in Tag values as columns?

We have a Production Run table named "packschedule", we want to run the following Select Query and include a live Tag, named {[default]Can Filler/Can Count}.

SELECT \* FROM Packschedule  
WHERE t\_stamp Between "2024-12-12 00:00:00" AND 2024-12-12 23:59:59"

How would we add or Join the Tag to this query?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [December 12, 2024, 7:43pm UTC](https://forum.inductiveautomation.com/t/how-to-populate-a-power-table-with-select-query-and-tag-values/99762/2 "2024-12-12T19:43:16Z")

</div>

It can be done, but why not just have a label bound to the tag and off to the side of the table? Must it really be in the table too?

---

<div class="post-metadata">

**Author:** ![paulm1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulm1/32/5900_2.png) [@paulm1](https://forum.inductiveautomation.com/u/paulm1)\
**Post date:** [December 12, 2024, 8:08pm UTC](https://forum.inductiveautomation.com/t/how-to-populate-a-power-table-with-select-query-and-tag-values/99762/3 "2024-12-12T20:08:16Z")

</div>

Thank you dkhayes117, That was my suggestion too.  
My customer would like it all incorporated into one table.  
Plus, i simplified the query for this forum. The actual one will be combing two tables and 6 tags.

Any idea how I can put the two sources (Table data and tag) into one power table?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 12, 2024, 8:11pm UTC](https://forum.inductiveautomation.com/t/how-to-populate-a-power-table-with-select-query-and-tag-values/99762/4 "2024-12-12T20:11:34Z")

</div>

You have to bind the query to a custom property, and script the creation of the combined table dataset to assign to the table's data property.

(Or use dataset manipulation/construction expression functions from my Integration Toolkit.)

---

<div class="post-metadata">

**Author:** ![paulm1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulm1/32/5900_2.png) [@paulm1](https://forum.inductiveautomation.com/u/paulm1)\
**Post date:** [December 18, 2024, 5:45pm UTC](https://forum.inductiveautomation.com/t/how-to-populate-a-power-table-with-select-query-and-tag-values/99762/5 "2024-12-18T17:45:38Z")

</div>

Thank you pturmel. We were able to display this table just like the customer requested. I have attached some screen shots of the testing for anyone else this might help.

 ![image003](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/d/dde5185fabff986a6aaf15907283990eb99a81bf.png)

 ![image001 (1)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/1/519f41d72e7d9949eb2c892e297ae3e15d58be0c.png)

 ![image002](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/c/1ccf328a021ffd2b1aec7dc6f7f45a0133f0f15f.png)
