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 / Avoid Duplicates colum...
Power Apps
Answered

Avoid Duplicates column from sharepoint list to gallery based on month and year selection

(0) ShareShare
ReportReport
Posted on by 599

Hi all,

I have a doubt. I have a SP List with three coulmns RecipientName , RecipientDate, Function and Type.

Here, ReciepientName is Single line of Text, RecipientDate Date and Time, Function is Lookup and Type is Single line of Text.

 

Now what i want is, i get a values from sp list and display on gallery.

In that gallery i need to do a Avoid duplicate Recipient Value and want to show thier function and Countrows of Type column.

 

This is my SP List,

RecipientNameRecipientDateFunctionType
Dhinesh17-02-2021 13:11SharepointHelpful resource
Dhinesh 16-02-2021 13:11SharepointInnovative
Suresh 11-02-2021 13:11JavaHard Worker
Suresh1-01-2021 13:11JavaNew Perspective
Dani 17-12-2020 13:11Mobile BankingHelpful resource
Rajan 10-08-2020 13:11.netHard Worker

Now i want to get a details from this list and need to display into a gallery.

 

i want a gallery like this Based on month and year and also avoid duplicate values,                        

022021 

Here 02 is Month and 2021 is year.

I used this Formula in my gallery Items,
AddColumns(GroupBy(Kudos,"RecipientName","RecipientEmail","CreatedonDate","Details"),"Count",CountRows(Details))

and am getting results like this,

Recipient NameRecipientDateFunctionCountRows(Type)
Dhinesh17-02-2021Sharepoint2
Dhinesh17-02-2021Sharepoint2
Dhinesh17-02-2021Sharepoint2
Dhinesh17-02-2021Sharepoint2

 

And i need a gallerylike this.. Based om month and year selection by dropdown.

022021 

 

Recipient NameRecipient DateFunctionCount Rows(Type)
Dhinesh17-02-2021Sharepoint2
Suresh11-02-2021Java2

This is what i need a Result.

 

In my gallery i want to avoid a duplicate values and then their Function. And display a gallery by Selected month and year.
finally i need a count of how many types they have.

This is possible? 



Thanks,

Dhinesh

Categories:
I have the same question (0)
  • Verified answer
    Vijay Tailor Profile Picture
    2,961 on at

    Hi @Dhinesh28R .

    Please Find the below Solution for your requirement.
    See the Screenshot for reference - 

    VijayTailor_0-1613569524779.png

    Code for the below solution - 

    ClearCollect(SPList,Table(
     {RecipientName:"Dhinesh",RecipientDate:"17-02-2021 13:11",Function:"Sharepoint",Type:"Helpful resource"},
     {RecipientName:"Dhinesh",RecipientDate:"16-02-2021 13:11",Function:"Sharepoint",Type:"Innovative"},
     {RecipientName:"Suresh",RecipientDate:"11-02-2021 13:11",Function:"Java",Type:"Hard Worker"},
     {RecipientName:"Suresh",RecipientDate:"01-02-2021 13:11",Function:"Java",Type:"New Perspective"},
     {RecipientName:"Dani",RecipientDate:"17-02-2021 13:11",Function:"Mobile Banking",Type:"Helpful resource"},
     {RecipientName:"Rajan",RecipientDate:"17-02-2021 13:11",Function:".net",Type:"Hard Worker"}
     ));
    
     //THis Code is for Group By 
    ClearCollect(GroupBySumColl1,AddColumns(GroupBy(SPList,"RecipientName","GrpEmp"),"EMpCOunt",CountRows(Filter(GrpEmp,RecipientName=RecipientName)),"TypeCol",Concat(GrpEmp,Type," | "),"NewDate",Concat(GrpEmp,Text(DateValue(RecipientDate),"[$-en-US]mm yyyy")," | ")));

    Thanks,

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay

  • Dhinesh28R Profile Picture
    599 on at

    hi @VijayTailor ,
    Now its Working man..
        

    But am tried with following code man,
    FirstN(SortByColumns(AddColumns(GroupBy(Filter(Kudos,Month(CreatedonDate)=Dropdown4.Selected.ID,Month(CreatedonDate)=Dropdown5.Selected.ID),"RecipientName","RecipientEmail","Details"),"Count",CountRows(Details)),"Count",Descending),5)..


    Now my proplem is i filtered gallery by month and year in dropdown..

    stored month and year in collection. if i select month it filtered correct value.. If i filtered by year it didnt show values..

     

    Thanks,

    Dhinesh

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard