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,270 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
    36,780 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 602

#2
WarrenBelz Profile Picture

WarrenBelz 473 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 310

Last 30 days Overall leaderboard