Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help joining tables in powerapps.



I am trying to join data I have from 3 separate sharepoint lists to populate a datatable in powerapps.


The main issue is that I need records from one table to become columns in the datatable. 





I need the Names of the table to become columns in my datatable. The tables are linked via ID keys, so performing lookup operations shouldnt be an issue; the issue is that I am struggling figuring out the syntax for essentially "looping" over this table and joining it such that these Names become columns in the datatable.


Any help appreciated.

Resolver II
Resolver II

Hi @Anonymous  you need to look into the AddColumn funtion along with the Lookup function to bring your one side table into you many table.

ID = HeaderID
If this post helps answer your question, please click on “Accept as Solution” to help other members. If you thought this post was helpful, please give it a Thumbs Up. 

Not applicable

Thanks for the reply. Unfortunately that solution doesn't help in my case because if I wanted to add columns based on records, I can't simply hardcode a column name as the second parameter in the AddColumns function. I would need a way to essentially loop through a specified range of records, grab the item name, and use those as the column name in the Add Columns function. I'm starting to think this isn't possible..

Hi @Anonymous ,


Could you share more detail thoughts with your scenario?

What is the relationship between these table? Can you describe more clearly?

What is data source? What is the data type of columns?


From my experience, Do you want to join two tables by the ID column? You can use ForAll function:

AddColumns(TableB,"Name",""); ForAll(TableA, Patch(TableB, LookUp(TableB, ID = TableA[@ID]),{Name:TableA[@Name] }))

The above code is creating the Name column in TableB, and Patch All TableA's name ( ID is matched) to TableB‘s Name column.

It's just for reference, you can post more details, and I will provide the code that fit your App.

Best regards,


Helpful resources

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users


We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (48,345)