Hello all of you!
I hope everyone’s ok here.
Last week i asked for a solution to merge a table on power query base on 1 condition only i guess. Now my table is different, which means, 2 conditions. Let me explain:
I need to lookup a table (Tab Employee Rates) for a particular employee id and the date of the fact table should be greater or equal than the lookup table. The purpose of this is to get the real hour value for each employee.
I’ve post this question :
and @Melissa helped on this. It use to work but only for one condition which was date. Now i have to check both conditions date, and worker id .
Here’s my (not working code)
BufferedTable = Table.Buffer (Table.Sort( #“Tab Employee Rates”,{{“DateR”, Order.Ascending}} )),
GetValue = Table.AddColumn(#“Renamed Columns”, “Unit Value”, each
try Table.LastN(
Table.SelectRows( BufferedTable, (BT) => BT[DateR] <= [Date] ),
1){0}[valor] otherwise null, type number),
I’ve attach a sample and it would be awesome if you guys could help me.
Thanks a lot
Pedro
Sample.xlsx (222.8 KB)