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

date lookup issue

hi , I'm having trouble again with a different formula now 

LookUp('week list','startdate (calc)'=DateAdd(Today(),1-Weekday(Today(),StartOfWeek.Monday),Days),week)

 

I want to have it so it gets the week number ( which is listed in the column "week" in the SP list " Week List" 

the "start date (calc)" column does include the time as i read this can cause issues 

 

there are no errors ,it just simply provides no output

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@daniels471 

If the column you are comparing has a time, then you will need to provide the exact match to the time as well.

You current formula is focused on the date without time.

If you want to compare equal types on both side of the equals, then consider this formula:

 

LookUp(
    'week list',
    Text('startdate (calc)', ShortDate) = Text(DateAdd(Today(),1-Weekday(Today(),StartOfWeek.Monday),Days), ShortDate),
    week
)

This will convert both sides to a shortdate text format and then they will compare properly.

Note: this is not a delegable operation and will produce a warning as such.  If record limits are not a concern, you can ignore it.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

3 REPLIES 3
Super User
Super User

Is your column 'startdate (calc)' an actually calculated column or a date/time column?

Super User III
Super User III

@daniels471 

If the column you are comparing has a time, then you will need to provide the exact match to the time as well.

You current formula is focused on the date without time.

If you want to compare equal types on both side of the equals, then consider this formula:

 

LookUp(
    'week list',
    Text('startdate (calc)', ShortDate) = Text(DateAdd(Today(),1-Weekday(Today(),StartOfWeek.Monday),Days), ShortDate),
    week
)

This will convert both sides to a shortdate text format and then they will compare properly.

Note: this is not a delegable operation and will produce a warning as such.  If record limits are not a concern, you can ignore it.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

that worked , along with the fact that i actually had the wrong start date in my share point list so of course it never was going to match

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (41,726)