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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter table with anot...
Power Apps
Unanswered

Filter table with another table

(0) ShareShare
ReportReport
Posted on by 16

I have two tables that I need help with filtering a gallery.

 

Table 1 has a column called Employee Name with a list of records, example "Nicky Thomas".

Table 2 has a similar column called fullname and with almost all the records being the same, except example "Nicky Thomas-Jones".

 

Filtering Table 1 by Table 2 does not return "Nicky Thomas" with an in operator.

Is there any way to get the filter to work?

Categories:
I have the same question (0)
  • DylanSimons Profile Picture
    326 on at

    How large are your tables? In general this will be a resource intensive operation and will take a long time, it essentially needs to go through every item in table 2 and use an "in" operator for each and every item in table 1. Can this be done in Power Automate and stored in another table instead of being done in Power Apps?

     

    I can try to come up with a solution if this is necessary in the App.

  • darry3ni Profile Picture
    16 on at

    As of now the tables have at most 20 records in each and yes it needs to be done in the app because the gallery items shown is based on the user.

  • DylanSimons Profile Picture
    326 on at

    Maybe I misunderstood your question. You want to filter Table 2 with only 1 item from Table 1?  As in you have a gallery with items from Table 1 and when selected this filters Table 2 with the selected item from Table 1?

     

    In that case you can use the "in" operator like this:

        Filter(Table2, Gallery.Selected.EmployeeName in FullName)

     

    Did you try this and it doesn't work?

  • darry3ni Profile Picture
    16 on at

    Oh no, I think you had the right idea the first time. 

    At the moment I'm using:

    Filter(Table1, 'Employee Name' in Table2.fullname)

     

    I'm only using the gallery to display the items and not for selection of an item.

     

    - The issue is that in Table2 some entries have hyphenated names and are not showing the Table1 matching record in the gallery.

  • Verified answer
    DylanSimons Profile Picture
    326 on at

    Okay, so this function should work if I understand what the question.

     

    ForAll(Table1, Collect(NameCollection, Filter(Table2, EmployeeName in FullName).FullName))

     

    It goes through the EmployeeName column on table 1 and uses that to filter EmployeeName on Table 2. Then, it collects the results in a collection(NameCollection here). 

     

    This is in the OnVisible property of the screen. This works for me with having multiple matches as well as the example you listed.

     

    DylanSimons_1-1602418653673.png

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard