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 / 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:
I have the same question (0)
  • 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,678 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,294 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,678 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

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard