Power Query: Search Rate of Employee from External Linked Query

Nicole Jones

New Member
Joined
Oct 22, 2016
Messages
35
Office Version
  1. 365
Platform
  1. Windows
I am at a loss as how to return the Rate of an employee that corresponds to the transaction date.

My query has the Employees Name multiple times as their rate has changed over the years, each entry has a Start and End date to define when the Rate is/was current for.

Can someone please help me with a new column formula to look at the employees name, then pull the rate for the employee when the transaction date lies in between the start and end date.

There are two queries. the Transaction Query with the hours booked giving the transaction date, and the second is the Rates Query that houses the rates over the years.

Sorry this is so confusing
 
@Nicole Jones , why don't you make up some sample of your data?
Providing that your data are consistent (you don't have gaps between end and next rate start date , you don't have transactions outside of rates schedule) then basing on sample data from your last topic:
Power Query:
let
    rates = Excel.CurrentWorkbook(){[Name="rates_table"]}[Content],
    rename_rates = Table.RenameColumns(rates, {"Start", "Transaction Date"}),
    transactions = Excel.CurrentWorkbook(){[Name="transactions_table"]}[Content], 
    combine_sort = Table.Sort(rename_rates & transactions, {"Employee Name", "Transaction Date"}), 
    fill_down = Table.FillDown(combine_sort, {"Rate"}), 
    filter = Table.RemoveColumns(Table.SelectRows(fill_down, (x) => x[End] is null), "End")
in
    filter
 
Upvote 0

Forum statistics

Threads
1,226,772
Messages
6,192,928
Members
453,767
Latest member
922aloose

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top