Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Filtering duplicatish items

Posted on by 40

Hi community. 

 

in my app i got a gallery displaying items from a sharepoint list. in my sharepoint list i got columns like MachineType, MachineId and Cycle and want to filter the data that way, that only 1 item of each MachineType-MachineId-Cycle Combination is displayed, ideally the last one added. do you have any idea how to accomplish that?

 

Help much appreciated, thanks in advance ❤️

Categories:
  • WarrenBelz Profile Picture
    WarrenBelz 143,297 on at
    Re: Filtering duplicatish items

    Hi @KAdler ,

    Yes that is exactly the workaround - you can only group by Text columns.

  • CU20111035-0 Profile Picture
    CU20111035-0 40 on at
    Re: Filtering duplicatish items

    Found a workaround by using AddColumns to add the Value of the choice column to the data. Afterwards i can GroupBy that new column. 🙂

  • CU20111035-0 Profile Picture
    CU20111035-0 40 on at
    Re: Filtering duplicatish items

    @WarrenBelz: Thanks for your quick reply. Looking good so far, but i can't group by Cycle. I guess it's related to it being at selection type column in the SP list. Neither Cycle not Cycle.Value got accepted. Is there any workaround?

  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 143,297 on at
    Re: Filtering duplicatish items

    Hi @KAdler ,

    Try

    GroupBy(
     Sort(
     SPList,
     ID,
     SortOrder.Descending
     ),
     MachineType,
     MachineId,
     Cycle,
     Grouped
    )
    

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard