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 : TRQ6zkCv0v7WBQzrmlcX9W
Power Apps - Building Power Apps
Answered

how to get the latest data from sharepoint list for specific fields.

Like (0) ShareShare
ReportReport
Posted on 27 Jul 2018 12:21:51 by 20

 

Dear all,

 

in my app, I want to get the latest data from my sharepoint list for specific Customer and period levels : 

 

I got this store in the sharepoin list

 

ID	CUSTOMER	PERIOD	IND_VALUE
2	C003	2018.07	500
3	C003	2018.08	450
4	C003	2018.09	350
5	C003	2018.10	300
6	C003	2018.11	350
7	C003	2018.12	420
803	C003	2019.01	250
805	C003	2019.01	550
809	C003	2018.09	420
804	C003	2018.11	300

 

 

and I want to get this : 

 

ID	CUSTOMER	PERIOD	IND_VALUE
2	C003	2018.07	500
3	C003	2018.08	450
809	C003	2018.09	420
5	C003	2018.10	300
804	C003	2018.11	300
7	C003	2018.12	420
805	C003	2019.01	550

 

 

 

Does someone know how I can tackle it ? (I tried function table, addcolumn, filter without success)

 

in advance thanks for your feedback.

 

Novice

  • novicenovice Profile Picture
    20 on 01 Aug 2018 at 15:48:54
    Re: how to get the latest data from sharepoint list for specific fields.

    Hello Kris,

     

    Thanks a lot, it works perfectly Smiley Happy

  • Verified answer
    v-xida-msft Profile Picture
    on 28 Jul 2018 at 09:40:07
    Re: how to get the latest data from sharepoint list for specific fields.

    Hi @novicenovice,

     

    Could you please share a bit more about the ID column and the PERIOD column in your SP list?

    Is the ID column a System column or a custom column? Is the ID column a Number type column?

     

    I assume that the ID column is a Number type column within your SP list, I have made a test on my side, please take a try with the following workaround:7.JPG

    Set the Items property of the Data table control to following formula:

    DropColumns(
    AddColumns(
    GroupBy(SortByColumns('20180728_case11',"OData__x0049_D1",Ascending),"PERIOD","GroupData"),
    "ID",Last(GroupData).OData__x0049_D1,
    "CUSTOMER",Last(GroupData).CUSTOMER,
    "IND_VALUE",Last(GroupData).IND_VALUE
    ),
    "GroupData"
    )

    Note: The "OData__x0049_D1" represents the ID1 column in my SP list data source (on your side, it is ID column). 

     

    On your side, please type the following formula:

    DropColumns(
     AddColumns(
     GroupBy(SortByColumns('YourSPListDataSource',"ID",Ascending),"PERIOD","GroupData"),
     "ID",Last(GroupData).ID,
     "CUSTOMER",Last(GroupData).CUSTOMER,
     "IND_VALUE",Last(GroupData).IND_VALUE
     ),
     "GroupData"
    )

    Best regards,

    Kris

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