Forum Discussion
Compare dates in two tables to return corresponding value to that date
Currently i have tried adding a custon column in power query with this:
let mydate=[Timesheet date] in
Table.SelectRows([Change In Circumstances], each [Date Chnaged] <= mydate)
It returns the correct first change, but if the job changes more than one, for the second and thrid job change, it duplicated leaving me with this:
- wdx223_Daniel3 years ago
Community Champion
you're almost there.
suppose your data in change log table is already sorted by date, then you just need to get the last record.
let mydate=[Timesheet date] in
Table.LastN(Table.SelectRows([Change In Circumstances], each [Date Chnaged] <= mydate),1)- Anonymous3 years agoNot applicable
Thanks for the response, its appreciated!!
For some one that goes through more than two jobs changes, it seems to only pull through the second, and not the thrid:
When ideally it needs to be: