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

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
    1,847 Super User 2025 Season 2 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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard