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 recor...
Power Apps
Unanswered

Remove duplicate records of column in gallery

(0) ShareShare
ReportReport
Posted on by 361

I need to remove duplicate records from a gallery that displays this data, but I cannot lose the essence of this formula, which is essential for the use of my application.

 

1. The column I need to remove the duplicates is 'Station with APA'

2. I tried with distinct at the beginning of the formula but it gave an error at the end, disappeared all the data in the gallery o.O

 

Joaoandrebs_0-1689094741994.png

If(
 !IsBlank(ComboBox1_1.Selected.Value);
 Filter(
 ListaEditavelOperacoes;
 Len(ComboBox1_1.Selected.Value) = 0 || Time = ComboBox1_1.Selected.Value
 );
 Filter(
 ListaEditavelOperacoes;
 Ativo = "23;j4;2i35j2;3'51j3902jr'23j"
 )
 )

 

my code,

 

thanks!! 

Categories:
  • madlad Profile Picture
    2,637 Moderator on at

    What exactly did you try for distinct? It's a very useful function in this scenario, and to get it working would likely be the best route.

  • rsinha Profile Picture
    2 on at

    Hi @Joaoandrebs 
    Kindly try using the Distinct functions right before both the filters, I did have similar sort of problem in past, and I used Distinct before Filter and it worked.
    Kindly try and let me know.

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @Joaoandrebs, If you are using the table's columns to map to text labels inside your Gallery, distinct won't work because distinct return a one column table

    Try this:

     

    If(
     !IsBlank(ComboBox1_1.Selected.Value);
    
    With({UniqueList: Distinct(
     Filter(
     ListaEditavelOperacoes;
     Len(ComboBox1_1.Selected.Value) = 0 || Time = ComboBox1_1.Selected.Value
     ),YourColumn))}; Filter(ListaEditavelOperacoes,YourColumn in UniqueList))
    
    ;
     Filter(
     ListaEditavelOperacoes;
     Ativo = "23;j4;2i35j2;3'51j3902jr'23j"
     )
     )

     

     

    If my reply helped you, please give a 👍   , & if it solved your issue, please give a 👍 & Accept it as the Solution to help other community members find it more.

    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.

    Visit my Blog: www.powerplatformplace.com

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

     

     

     

     

     

     

     

     

  • cwebb365 Profile Picture
    3,334 Most Valuable Professional on at

    Don't forget distinct() is not delegable. So if your datasource is a large one, you will be limited in it working correctly with more than the set delegation setting (500 by default). You would have to connect to pre distinct values through views or other means outside of powerapps in order to utilize distinct if you return many values.

     

    If your filter can always be less than the delegation limit you can always pull those values into a collection, then run distinct on that collection to get unique filtered values however. 

  • Joaoandrebs Profile Picture
    361 on at

    @AhmedSalih @cwebb365 firstly, thanks for reply, 

     

    Ahmed, I tried your code but it still keeps showing the repeated items

     

    Joaoandrebs_0-1689118931592.png

     

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @Joaoandrebs, you need to use ... in UniqueList.Value

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
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard