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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Lookup help

(0) ShareShare
ReportReport
Posted on by 421

Hi everyone.  Need some help with a lookup function in my inspection app.

I have a label with the current formula "

LookUp(TTDDefectCaptures,CompareDefect = ThisItem.CompareGameList).defectSubWeek"

This returns a week that an item was inspected.  Since we are not clearing the data out, it stores each week that data was created.  The week we are in is week 11, last week being week 10.  The issue I am seeing is that the lookup will look for the oldest entry, or it will not see a new entry. So if I do an inspection today, the lookup will not see week 11 in the lookup formula.  Ive messed with using First, but to no avail.  Any help would be amazing, thank you!!!

 

Chris

Categories:
I have the same question (0)
  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @ckserra33 lookup will return the first value

     

    Consider a tabe as datasource: Table({a:0, b:1},{a:0, b:2},{a:0, b:3})

    a = yourItem

    b= weeknumber

     

    Lookup the latest weeknumber would be.

    LookUp(
     Sort(
     Table(
     {a:0, b:1},
     {a:0, b:2},
     {a:0, b:3}
     ),
     b,
     Descending
     ),
     a = 0
    ).b

     

    yours

    LookUp(

    Sort(TTDDefectCaptures,CompareDefect = ThisItem.CompareGameList),defectSubWeek,Descending).defectSubWeek

    )

     

    hope it helps,

    R

  • Verified answer
    techie-t Profile Picture
    18 on at

    This sounds like it could be related to delegation. When you go to Settings > Data Row Limit , try increasing this to 2000. Alternatively, if your list could potentially increase to larger than 2000 rows, try to filter your list before you use lookup. Something like LookUp(Filter(TTDDefectCaptures, ______ = ___),CompareDefect = ThisItem.CompareGameList).defectSubWeek). Another option is to try sorting your list before you lookup so that you are querying the newer items first such as LookUp(SortByColumns(TTDDefectCaptures, "createdon", Descending),CompareDefect = ThisItem.CompareGameList).defectSubWeek

  • Verified answer
    ckserra33 Profile Picture
    421 on at

    Thank you @techie-t and @rubin_boer for the quick responses!!  I wound up using your solution snd sortbycolumns before the lookup, and it worked great! 

     

    Here is the formula, thanks again!!

     

    LookUp(SortByColumns(TTDDefectCaptures,"createdon",Descending),CompareDefect = ThisItem.CompareGameList).defectSubWeek

     

    Chris

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard