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 / Filter collection usin...
Power Apps
Unanswered

Filter collection using other collection

(0) ShareShare
ReportReport
Posted on by 5

I have 2 collection as below

 

Table1

Col1Col2
A,B,C1
B,C,D1
A,C,D3
A,B2
A,C6
A,D1
B,C9
B,D0
A,B,D7

 

Table2

Col3
A
B
D

 

I am trying to match the item of Table2.Col3 with Table1.Col1 and get Table1.Col2 in return ( expecting 7 in return for A,B,D combination from last row of Table1)

 

I did try the below below formula but it is not working

Filter(Table1, Col1 in Table2.Col3)

 

As an alternative, I did reform Table1 as below, kept Table2 as before

Col1Col2Col3Col4Col5
A,B,CABC1
B,C,DBCD1
A,C,DACD3
A,BAB 2
A,CAC 6
A,DAD 1
B,CBC 9
B,DDD 0
A,B,DABD7

 

used the below formula

Filter(Table1, (Col2 = Blank() || Col2 in Table2), (Col3 = Blank() || Col3 in Table2), (Col4 = Blank() || Col4 in Table2)).Col5

 

What this is doing is, it is returning all the rows where part of the items are there ( getting back data from Table1.Col5 for A,B/A,D/B,D/A,B,D in Table1.Col1)

 

 

Any help?

Categories:
  • Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at

    Hey @Sanu_Man ,

     

    If the Format is always like this you could use this function:

     

    Filter(
     Table1,
     Concat(
     Table2,
     Col3,
     ","
     ) = Col1
    )

     

    Just make sure to always sort your tables accordingly.

     

    Let me Know if this solution worked for you.

  • Sanu_Man Profile Picture
    5 on at

    I tried it and it worked. Problem is that Table1 can have A,B,D/A,D,B/D,B,A/B,D,A, in short any combination. Hence even if I sort Table2, there's no way for me to know if combinations in Table 1 was sorted before doing the concatenation.

  • Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at

    I worked something out. Not the most beautiful solution there is probably but it should do the job: 

    With(
     {RowNumber: CountRows(Table2)},
     Filter(
     Table1,
     And(
     If(
     RowNumber > 0,
     Col2 in Table2
     IsBlank(Col2)
     ),
     If(
     RowNumber > 1,
     Col3 in Table2,
     IsBlank(Col3)
     ),
     If(
     RowNumber > 2,
     Col4 in Table2,
     IsBlank(Col4)
     )
     )
     )
    )

     

    Hope this helps you out.

     

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 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard