web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : V2aIukzpoYNYx86L1qtaBD
Power Apps - Building Power Apps
Unanswered

get last in date of each distinct shop.

Like (0) ShareShare
ReportReport
Posted on 8 Mar 2023 13:24:05 by 59

Hey,

 

How can i retrieve in a collection, the last in date of each store. 

DATAVERSE TABLE:

StoreNameCreated OnNameStore Number
Store101/02/2022S_865658
Store104/02/2022S_875655
Store202/01/2022S_652523
Store203/10/2023S_646565

So that in my collection i have the S_87 of store1 and S_64 of store2 only. 

Thanks.

Categories:
  • BCBuizer Profile Picture
    22,262 Super User 2025 Season 2 on 08 Mar 2023 at 15:05:14
    Re: get last in date of each distinct shop.

    Hi @LoopinG2023 ,

     

    My fist try includes using GroupBy to get the unique values for StroreName and AddColumns to get the name value of the most recent item per StoreName:

     

    ClearCollect(
     CollectionName,
     AddColumns(
     GroupBy(
     DATAVERSE TABLE,
     "StoreName",
     "ItemsByStoreName"
     ),
     "LastCreatedName",
     First(
     Sort(
     ItemsByStoreName,
     'Created On',
     SortOrder.Descending
     )
     ).Name
     ).LastCreated
    )
    

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete