web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to compare two gal...
Power Apps
Unanswered

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:
I have the same question (1)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,335 Super User 2025 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard