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 / Merge two collections ...
Power Apps
Answered

Merge two collections become one collection

(0) ShareShare
ReportReport
Posted on by 314

Hi,

I have two collections, and I want to two collections merge together become one collection with duplication.

Both collections has same columns.

Fo example:

Collection A

Name                       Email

============  ==============

User A                      UserA@test.com

User B                      UserB@test.com

 

Collection B

Name                       Email

============  ==============

User B                      UserB@test.com

User C                      UserC@test.com

 

Final Collection:

Name                       Email

============  ==============

User A                      UserB@test.com

User B                      UserB@test.com

User C                      UserC@test.com

  

What is best way to do it?

Thanks! 

Categories:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @usaman45 ,

    If you can alter one of the collections, the formula will be:

     

    Collect(Collection1,Filter(Collection2,!(Email in Collection2.Email) ))

     

    Otherwise, if you need a new collection containing the result:

     

    Collect(NewCollection,Collection1,Filter(Collection2,!(Email in Collection2.Email) ))

     

    I supposed that the Email is the unique value column.  

    Hope it helps !

  • Verified answer
    timl Profile Picture
    37,248 Super User 2026 Season 1 on at

    Hi @usaman45 

    The formula below will combine the 2 collections and show the distinct names/emails from both collections.

     

    ClearCollect(CollectionA, 
     {Name: "User A", Email: "UserA@test.com"}, 
     {Name: "User B", Email: "UserB@test.com"}
    );
    
    ClearCollect(CollectionB, 
     {Name: "User B", Email: "UserB@test.com"}, 
     {Name: "User C", Email: "UserC@test.com"}
    );
    
    ClearCollect(FinalCollection,
     DropColumns(
     GroupBy(
     Ungroup(Table(
     {collection: CollectionA},
     {collection: CollectionB}
     ), 
     "collection"
     ),"Name","Email","DistinctGroup"), 
     "DistinctGroup")
    );

     

    timl_0-1707675096464.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

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard