Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Possibile to Add Columns and use Sort

So I am trying to make a pretty simple app that basically uses my current SQL sources. I am having an issue though in combining the 3 different tables together so my Gallery has info from the different spots AND then sorting and filtering that same list?  Is that possibile?


My data looks something like this:

Physicians | Name, ID, Phone

Physician Office | Address, Physician_ID, Office_ID

Contacts | Office_ID, SalesRep_ID

Reps | SalesRep_ID,  RepName


What I want to do is have a listing of the Physicians and then get all the way down to the RepName... to do that I need to hop through 3 tables and do matches as you see.. from searching through I found that on the ITEMS list I can add columns, which worked for one table, but not sure how to add the others. Then in addition I would then like to SORT and FILTER on that Items list.. so I am stuck. 1) I am unsure how to add more than one addcolumns to get results from multiple tables? 2) I am unsure how to addcolumns in the items area and then also add a sort and filter?


I think I am not in the right direction at all.. any help on what I am supposed to be doing to get these to work? Or am I supposed to be building a collection or using the Collection service for something like this instead?


Thanks for the help. New to the product.

Community Support
Community Support

Re: Possibile to Add Columns and use Sort

Hi @ryanstokes,


Within PowerApps you could take use of Lookup() function to find the proper data through another table.

For example, if we have the proper record selected from the Physicians table from a Gallery1,

then to get the RepName, the formula should be:

        SalesRep_ID= Lookup(Contacts,
                          Office_ID= Lookup(Physician Office,

To AddColumns within PowerApps, we need to take use of the AddColumns function, for more details, please see:


Some more readings:





Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,257)