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 Only see Duplic...
Power Apps
Answered

How to Only see Duplicate Records

(0) ShareShare
ReportReport
Posted on by 114

i have a large collection that has duplicate records.  i can use this to change the color of a record if it is a duplicate value.


If(CountRows(Filter(colTest,Name=ThisItem.Name))>1,Orange,White)

Works fine.  But know i only want to see the duplicate records.  Can you filter a collection to show only duplicates? i know i can use distinct to get a single entry for every value.

 

how can you filter a gallery to show only the ones that are duplicated?

Categories:
  • Rebetcha Profile Picture
    645 on at

    Hi @wsalling ,

     

    I will share my approach how I would tackle this. The information you have shared does not allow me to share a worked out formula with you, so you need to figure that out yourself based on your specific scenario.

    The approach here is transforming your collection in a way that you can easily identify the duplicate records. 

    1. Start by making use of the GroupBy function in a way that the records that are duplicate of each other are grouped together. 
    2. The next step would be to calculate the number of records in a group (CountRows). 
    3. When you have that you can filter on all groups where the number of records is more > 1.
    4. You now have a grouped table with only groups containing duplicates. Use UnGroup and Distinct to transform the records back to a flat table with only records that have duplicates in the collection you started out with.

    Let me know if this solves your problem.

  • wsalling Profile Picture
    114 on at

    Found a way to create a new collection then apply filter to that collection in the gallery.  is there different way to do straight in gallery?

  • wsalling Profile Picture
    114 on at

    i used GroupBy to create a new collection.

    On Screen Visible:

                                 ClearCollect(ColTempDups,GroupBy(varStatement,"Name","Other"));

    then in Gallery Items

                                    Filter(ColTempDups,CountRows(Other)>1)

    This shows me what i want,but can it be done in one step in Items field?

     

  • Verified answer
    Rebetcha Profile Picture
    645 on at

    Hi @wsalling ,

    Yes, you can do that directly in the Items property of your gallery without having to store it in a collection by combining your GroupBy and Filter in one formula.

     

    Try this:

    Filter ( GroupBy(varStatement,"Name","Other"), CountRows(Other)>1)

     

  • wsalling Profile Picture
    114 on at

    Thank You R.  I beat my head on table for about an hour on this one.

  • Rebetcha Profile Picture
    645 on at
    You are very welcome. Happy to help.
    You where actually nearly there. I just combined the 2 formulas you came up with and removed the collection bit.

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 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard