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 / How to compare two gal...
Power Apps
Suggested Answer

How to compare two galleries

(1) ShareShare
ReportReport
Posted on by 2
Hello, I have created two galleries that are linked to two different databases. I'd like to compare the items in these two galleries. The item is Site label. If the text has the same value, I'll display it as follows. It's possible ?
Categories:
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at
    Hi
     
    Unfortunately no matter how many times I load your question, I see nothing below your words, so :-( I am unable to help you much.
     
    But you aren't really comparing the galleries, you care comparing just a single Column correct?
     
     
  • Suggested answer
    Ammar Zaied Profile Picture
    97 on at

    it's possible to compare the items between two galleries and display them if the Site label has the same value. Here’s a basic way to achieve this in Power Apps:

    Steps:

    1. Assume two galleries, Gallery1 and Gallery2, are linked to two different data sources. Each gallery has a text label showing the Site label.

    2. Add a label to your screen where you want to display the matching Site labels.

    3. Use a formula to compare the items in the two galleries. Here's an example of how you can do it:

    ForAll(Gallery1.AllItems, 
        If(
            !IsBlank(
                LookUp(Gallery2.AllItems, SiteLabel = ThisRecord.SiteLabel)
            ), 
            Concat(ThisRecord.SiteLabel, Text(ThisRecord.SiteLabel) & ", ")
        )
    )
    

     

    Explanation:

    • ForAll(Gallery1.AllItems, ...): Loops through all the items in Gallery1.
    • LookUp(Gallery2.AllItems, SiteLabel = ThisRecord.SiteLabel): Searches for the item in Gallery2 where the Site label matches the current item in Gallery1.
    • Concat: Combines all the matching Site labels from the galleries.
    • ThisRecord.SiteLabel: Refers to the Site label in the current record of Gallery1.
     

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