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 / how to get the latest ...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on 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

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    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

  • novicenovice Profile Picture
    20 on at

    Hello Kris,

     

    Thanks a lot, it works perfectly Smiley Happy

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 301 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 297 Most Valuable Professional

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard