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 / Compare two collection...
Power Apps
Answered

Compare two collections & filter gallery

(0) ShareShare
ReportReport
Posted on by 55

Hello,

 

I would like to compare 2 collections in 2 galleries, remove the duplicate values and only show the remaining items . Please see the screenshot below

 

I have a collection that holds booked desks, and a collection that shows all desks. I would like the gallery 'GalleryDesks' to ommit the 2 entries in 'galleryBooked' - is this possible?

 

Thanks in advance

 

powerapps.png

Categories:
I have the same question (0)
  • Ram Prakash Duraisamy Profile Picture
    5,877 Super User 2026 Season 1 on at

    Hello @JmeBrey,

     

    You can try below query,

     

    You need to use ForAll inside ForAll to find the query and remove the value from collection

     

    ForAll(galleryDesk,ForAll(galleryBooked,If(galleryDesk.Desk=galleryBooked.Desk,Remove(galleryDesk,First(Filter(galleryDesk,Desk=galleryBooked.Desk))))))

     

    Let me know if you have any queries

     

    Please Mark as Answer if it's helpful

     

    Subscribe:https://youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

     

    Blog:https://microsoftcrmtechie.blogspot.com

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @JmeBrey :

    Do you want to get desks that are not booked in ‘Available desks’?If so,please try:

    I assume there are two tables:

    ClearCollect('Booked desks',{Name:"Desk 1",Date:"2-25"},{Name:"Desk 2",Date:"2-29"});
    ClearCollect('Available desks',{Name:"Desk 1",Date:"2-25"},{Name:"Desk 1",Date:"2-29"},{Name:"Desk 1",Date:"2-30"},{Name:"Desk 1",Date:"2-36"},{Name:"Desk 1",Date:"2-37"},{Name:"Desk 2",Date:"2-41"})

    Please try:

    Filter('Available desks',!(Name&Date in Concat('Booked desks',Name&Date)))

     Best Regards,

    Bof

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 305 Most Valuable Professional

#2
11manish Profile Picture

11manish 212

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard