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 / Filter out duplicate r...
Power Apps
Unanswered

Filter out duplicate rows in gallery

(0) ShareShare
ReportReport
Posted on by

Hi

I have a SP list comparising staff annual leave records. Each member of staff currently has 5 records each but in a particular gallery I only want to show one record per staff member. I have tried the DISTINCT function in the ITEMS propert of the galler such as:

 

Distinct('Time Off Balances', Employee),Value

 

...but this only returns one column so I am unable to 'get at' the other columns using the usual "ThisItem....." property?

 

Can anyone tell me how I remove duplicate rows based on the EMPLOYEE NAME but still show all columns available in the gallery please?

 

Many thanks!

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,501 on at

    Hey @jed76 

     

    Try this:

     

    Set the Items property of the gallery to the following formula:

    Distinct('Time Off Balances', Employee, AllColumns)

     

    Here, we are using the All Columns argument to include all columns from the 'Time Off Balances' list in the Distinct function. Now, you can access the columns of each distinct record using the usual "ThisItem" property. For example, if you want to display the Employee Name and other columns in the gallery, you can use the following code(Replace labels with gallery controls):

     

    Label1.Text = ThisItem.Employee
    Label2.Text = ThisItem.OtherColumn1
    Label3.Text = ThisItem.OtherColumn2

     

    By using the Distinct function with the All Columns argument, you will get a unique set of records based on the employee name while still having access to all columns of each distinct record in the gallery.

     

    I hope this helps 🙂

  • jed76 Profile Picture
    on at

    Hi

     

    Many thanks!

     

    I must be writing something incorrectly as 'AllColumns' isn't recognised? Sounds exactly what I want though!

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard