cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MatthewLeslie
Helper I
Helper I

Sorting a sharepoint list by the ID column before filtering.

Good-day

 

I have a problem where by i want to populate a text input(Odometer) with the last registered (Most Recent) Odometer reading in my share-point list(to remove human error as much as possible). However because my list is automatically in ascending its always returning the first record ever entered and not the most recent which is the only one that is relevant.

 

Thus far I've used the following LookUp:

LookUp(BowserSheet1, AssetNumber = DataCardValue12.Selected.Result, Odometer)

 

Could somebody please help me incorporate a Sort into that so its always checking the highest IDs first and then only the lower ones. To make my list in Descending

 

Attached is a photo a Dummy share-point List to help you understand

 

Thanks in advance. 

Matthew

 

@mdevaney  @v-siky-msft 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@MatthewLeslie 

Yes, of course.  You can SORT in descending order and then perform the LOOKUP like this:

LookUp(
    Sort(BowserSheet1, ID, Descending),
    AssetNumber = DataCardValue12.Selected.Result,
    Odometer
)

 

---
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."

View solution in original post

2 REPLIES 2
mdevaney
Super User III
Super User III

@MatthewLeslie 

Yes, of course.  You can SORT in descending order and then perform the LOOKUP like this:

LookUp(
    Sort(BowserSheet1, ID, Descending),
    AssetNumber = DataCardValue12.Selected.Result,
    Odometer
)

 

---
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."

View solution in original post

Thanks so much my friend, have a nice day.

 

Kind Regards 

Matthew 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,213)