web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Joining two tables

(0) ShareShare
ReportReport
Posted on by 224

Here's my failed formula:
Distinct(Filter(Provider_Resource_Guide, 'AR Start' <= Value(TextInput1.Text) && 'AR End' >= Value(TextInput1.Text) && Skilling = NameList1_9.Selected.Value && 'Provider Inclusion By State', 'State (State0)' = NameList1_8.Selected.Value && Provider = 'Name (Title)'), 'Name (Title)')

I'm trying to join these two tables based on 'Provider Inclusion By State', 'Provider' and "Provider_Resource_Guide, Name (Title)'
Basically if AR Start and AR End and Skilling match the values in Provider_Resource_Guide, I want to return Name (Title) if it matches a Provider that is also eligible w/in that state in the Provider Inclusion By State list. Hope I'm making sense. Thank you for any help!

Categories:
  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Hi @kgiles123 

     

    I'm sorry but I didn't quite understand your question.  You mentioned that you wanted to join two tables, but your formula looks like its to filter a Gallery.

    Can you provide a screenshot or example of your data and what it is you're trying to return to the user?

  • kgiles123 Profile Picture
    224 on at

    Thanks for looking at this Rusk! I'm still fairly new to PowerApps so I'm probably explaining it all wrong. 

    1. I have two SharePoint Tables and a series of cascading lists in a PowerApp. I'm hoping to filter down to the provider name in the last PowerApp List. 
    2. Here's the Provider Inclusion By State SP List. Sorry I can't show our Provider names:

    kgiles123_0-1683924228408.png

    3. Here's our Provider_Resource_Guide SP List. Provider names covered again:

    kgiles123_1-1683924408243.png

     

    4. Lastly here is our PowerApp:

    kgiles123_2-1683924489884.png

     

    If the qualifiers of Age Range (AR Start & AR End) are met as well as skilling, we would like to match the Provider names returned to what was selected for State and return the qualifying Provider names from the Provider Inclusion By State list. Hope this makes more sense. Thank you!

  • Verified answer
    Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Hi @kgiles123 

     

    That info helped a lot!  There's a several ways to accomplish this.  Here's one idea:

    1) Create a collection to combine your tables. 

    You can include this type of formula in your app OnStart property or the screen OnVisible property.  In this example, I've used a button.  Be sure to replace my collection names / columns with your actual ones:

    ClearCollect(colNewTable,
     AddColumns(colProviderState, 
     "Care", LookUp(colProviderResource, Name = colProviderState[@Name]).Care, 
     "AR Start", LookUp(colProviderResource, Name = colProviderState[@Name]).'AR Start',
     "AR End", LookUp(colProviderResource, Name = colProviderState[@Name]).'AR End'
     )
    )

    The result is one combined table, which I believe is what you were looking for.  In this example, the first 2 tables are the different sources, and the 3rd is the combined:

    Rusk_0-1683932297269.png

    2) Use your formula to filter the desired results

    Concat(Filter(colNewTable, Dropdown1.Selected.Age >= 'AR Start' && Dropdown1.Selected.Age <= 'AR End' && State = Dropdown2.Selected.State && Care = Dropdown3.Selected.Care), Name & Char(13))

    Rusk_1-1683932912267.png

    You'll need to modify the ".Age" portion of the formula to work with your column names.  That's just how my example was set up.  Just type "." after the "Dropdown1" to see what valid options exist for your data

  • kgiles123 Profile Picture
    224 on at

    Hi Rusk! Thank you for your response! I'm a little new to this so please forgive my ignorance. Can I trigger this with an OnSelect fx in my Skilling list? Am I adding a Data Table to my page? 

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Hi @kgiles123 

     

    No you don't need to add a table to your page, my screenshot with the tables was just to display what is happening when you use these formulas.  The tables do not need to be visible. Yes, you could in theory trigger this with an OnSelect, but then it will run every time it's clicked.  You could instead do this joining just once by placing the formula in the OnStart property of your app:

    ClearCollect(colNewTable,
     AddColumns(colProviderState, 
     "Care", LookUp(colProviderResource, Name = colProviderState[@Name]).Care, 
     "AR Start", LookUp(colProviderResource, Name = colProviderState[@Name]).'AR Start',
     "AR End", LookUp(colProviderResource, Name = colProviderState[@Name]).'AR End'
     )
    )

     

    For your "Name" text box, that's where you'd use this filter formula:

    Concat(Filter(colNewTable, Dropdown1.Selected.Age >= 'AR Start' && Dropdown1.Selected.Age <= 'AR End' && State = Dropdown2.Selected.State && Care = Dropdown3.Selected.Care), Name & Char(13))

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard