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
Suggested Answer

Compare two collections and return values

(1) ShareShare
ReportReport
Posted on by

I have two collections in Power Apps: ValoresDropDown and ValoresGalleryText.

I need to compare ValoresGalleryText with ValoresDropDown, where ValoresDropDown is the base and ValoresGalleryText is the current one. I need it to perform this comparison and return the values that are missing in relation to the base collection (ValoresDropDown).

 

 

Categories:
I have the same question (0)
  • Suggested answer
    MichaelFP Profile Picture
    2,001 Moderator on at
    Hello!
     
    You can do it a for all for that.
     
    Clear(MissingItems);
    ForAll(ValoresDropDown as VD,
         If(IsBlank(Lookup(ValoresGalleryText,Value = VD.Value)),Collect(MissingItems,VD.Value))
    );
     
    You will iterate all of the ValoresDropDown Values and try to find these values im ValoresGalleryText, If the Lookup() is blank means that the current value is missing in ValoresGalleryText, and you include in a new collection to have the list of missing values.
     
     
  • Suggested answer
    SL-11020816-0 Profile Picture
    23 on at
    I find this:
     
    By refining the code to display only the items that differ between the two collections, we arrive at the following:
     
    ClearCollect(
        col_MissingValue;
        ShowColumns(
            Filter(
                AddColumns(
                    ValoresDropDown ;
                    MatchFound;
                    !IsBlank(
                        LookUp(
                            ValoresGalleryText;
                            Value = ValoresDropDown[@Value]
                        )
                    )
                );
                MatchFound = false
            );
            Value
        )
    );;
    I hope this has been helpful or provided some guidance. Best regards.

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

#2
11manish Profile Picture

11manish 180

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard