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 / Remove Duplicate from ...
Power Apps
Answered

Remove Duplicate from Gallery

(0) ShareShare
ReportReport
Posted on by 61

how can we remove duplicates from a gallery without using Distinct function because I'm building a 3 nested gallery 1st will show only created by name, the 2nd ID of the request, 3rd details.

Distinct function is limiting the second gallery ? 

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @wass :

    If you are worried about the loss of other fields after using the Distinct function, I suggest you use these methods.

    Method1: ForAll+Distinct+Lookup

    ForAll(
     Distinct(
     YourDataSource,
     TheNameColumn
     ),
     LookUp(
     YourDataSource,
     TheNameColumn= Result
     )
    )

     Using this method for deduplication, both in accordance with TheNameColumn this column deduplication can also make the return value maintain the original data structure

    Method2:Groupby

    GroupBy(
     YourDataSource,
     "TheNameColumn",
     "NewGroup"
    )

    This method is to group according to a certain field. It will change the data structure of the return value, but it can ensure the integrity of the data.

    I think these links will help you a lot:

    ForAll function in Power Apps 

    GroupBy and Ungroup functions in Power Apps 

    Best Regards,

    Bof

  • wass Profile Picture
    61 on at

    it did worked but when I'm using the below formula on the second gallery it doesn't show any data do you know why?

    Filter('Purchase Forum',Title=PrimaryGallery.Selected.'Created By'.DisplayName)

    @v-bofeng-msft 

  • sonam1996sahoo Profile Picture
    143 on at

    Thank You @v-bofeng-msft 🤗

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard