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 / Display Duplicate Item...
Power Apps
Unanswered

Display Duplicate Items in Gallery

(0) ShareShare
ReportReport
Posted on by

Hello!

 

I am trying to display duplicate items in a gallery but I am having a heck of a time getting it to work!

I am connecting to a Collection created from a SharePoint list.

 

I am able to highlight the duplicate items in the Gallery that are duplicates by using:

If(CountRows(Filter(Collect_AllMonths, 'Name' = ThisItem.Title))>1, Orange, White)

 

However I am not able to filter the gallery to only show all of the highlighted duplicate items.

 

Thank you!

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @Anonymous ,

     

    Do you want to display all duplicate items in the gallery?

    Would you like the duplicate items in the gallery to be shown in merged or separated?

    And do you want an Icon to decide whether the gallery display all items or duplicate items?

     

    I assume that you want an Icon to determine whether display all items or duplicate items and show them in a separated form, and bases on the assumption I made a test:

    FilterDuplicateItems.gif

     

    As you can see, I made the data source of the gallery manually filtered in two ways bases on a context variable applied on an Icon:

     

    UpdateContext({Duplicate1:!Duplicate1})

     

    In gallery’s Items property, use the formula kind like:

     

    SortByColumns(If(Duplicate1,Filter(Ungroup(AddColumns(GroupBy(,'Name',"dupname"),"dup",CountRows(dupname)),"dupname"),dup>1),Collect_AllMonths),'Name',If(SortDescending1, Descending, Ascending))

     

    The formula first group the collection by the column Title and duplicate records in the table of the ”dupname” field, then add a column to store the results of CountRows(), then Ungroup and we get a table with a column of "dup" in which are the count of lines, we only need to filter the result of >1 which means more than one record.

     

    Best regards,
    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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