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 Platform Community / Forums / Power Apps / Filtering two collections
Power Apps
Answered

Filtering two collections

(0) ShareShare
ReportReport
Posted on by 53

Hey there,

 

I am new to PowerApps and working on my first app.  I have spent days trying to figure this out but no luck so grateful if anyone can help me.

 

I have two collections, collectionOne and collectionTwo

 

TableOne 

 

LookupID     Invoice

1                   32

2                   48

3                   49

4                   52

5                   67

 

tableTwo

 

LookupID

 

2

4

5

 

I am trying to filter these two tables and find any matches e.g. 2 and 5 and then get the corresponding invoice number  e.g. 48, 67 to store in a new collection. LookupID columns are both lookups to related dataverse tables.

Filter(

        collectionOne, tableOne[@LookupID].LookupID, Value in collectionTwo[@LookupID].LookupID

       )

 

Any suggestions where I am going wrong would be soooo helpful.

 

 Thanks 

      

 

 

Categories:
I have the same question (0)
  • Verified answer
    anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @GreenFrog ,

    i have implemented a test for your use case and working fine for me give it a try:

    ClearCollect(
     collectionOne,
     {
     LookupID: 1,
     Invoice: 32
     },
     {
     LookupID: 2,
     Invoice: 48
     },
     {
     LookupID: 3,
     Invoice: 49
     },
     {
     LookupID: 4,
     Invoice: 52
     },
     {
     LookupID: 5,
     Invoice: 67
     }
    );
    ClearCollect(
     collectionTwo,
     {LookupID: 2},
     {LookupID: 4},
     {LookupID: 5}
    );
    ClearCollect(
     matchedCollection,
     Filter(
     collectionOne,
     LookupID in ForAll(
     collectionTwo,
     LookupID
     )
     )
    );

     

     

     


    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.

  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @GreenFrog 

     

    can u try this:

    ClearCollect(
     MatchingInvoices,
     Filter(
     collectionOne,
     LookupID in collectionTwo.LookupID
     )
    )
    

    you would need to rename to your needs 

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • GreenFrog Profile Picture
    53 on at

    thank for looking at this for me. 😀

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard