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 / Combining 2 collection...
Power Apps
Answered

Combining 2 collection into 1 collection

(0) ShareShare
ReportReport
Posted on by 29

Hi All,

 

I have 2 collections that I want to combine into 1 as below

 

Collection 1

A1
A2
A3
A4

 

Collection 2

B1
B2
B3
B4

 

Current Outcome

A1 
A2 
A3 
A4 
 B1
 B2
 B3
 B4

 

Desired Outcome - Combined Collection

A1B1
A2B2
A3B3
A4B4

 

Thanks in advance

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @MikeSwerve ,

    Substitute the actual field names in the function at the bottom. You can call Field1 and Field2 whatever you want.

    With(
     {
     wC1: 
     ForAll(
     Sequence(
     CountRows(Collection1)
     ),
     Patch(
     Last(
     FirstN(
     Collection1,
     Value
     )
     ),
     {RowNo1: Value}
     )
     ),
     wC2: 
     ForAll(
     Sequence(
     CountRows(Collection2)
     ),
     Patch(
     Last(
     FirstN(
     Collection2,
     Value
     )
     ),
     {RowNo2: Value}
     )
     )
     },
     ClearCollect(
     colCombined,
     ShowColumns(
    	 AddColumns(
     wC1,
     "Field1",
     LookUp(
     wC2,
     RowNo2 = RowNo1
     ).FieldName1,
     "Field2",
     LookUp(
     wC2,
     RowNo2 = RowNo1
     ).FieldName2
     ),
     "Field1",
     "Field2"
     )
     )
    )

    I have a blog on this process that may assist also

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • MikeSwerve Profile Picture
    29 on at

    Thanks WarrenBelz,

    Are the wD2's meant to be wC2's?

    What am I meant to rename FieldName1 and FieldName2 as?

  • MikeSwerve Profile Picture
    29 on at

    Collection 1

    Title
    A1
    A2
    A3
    A4

     

    Collection 2

    Data
    B1
    B2
    B3
    B4

     

    Current Outcome

    TitleData
    A1 
    A2 
    A3 
    A4 
     B1
     B2
     B3
     B4

     

    Desired Outcome - Combined Collection

    TitleData
    A1B1
    A2B2
    A3B3
    A4B4
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @MikeSwerve ,

    First one - typo now fixed. The field names are the two that will show in the combined collection - you can name them whatever you want.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • MikeSwerve Profile Picture
    29 on at

    Thanks WarrenBelz, got it working.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard