Yes, you can add a custom column in Excel Power Query using an embedded if-then statement to return a rate based on the job code. You can do this by following these steps:
- In Power Query, go to the Add Column tab.
- Select Custom Column.
- In the Custom Column dialog, you can write your if-then logic. For example:
This formula checks if the value in the JobCode column equals "4C03". If it does, it returns $2.50; otherwise, it returns null.if [JobCode] = "4C03" then 2.50 else null - You can add more conditions by using
else ifstatements to check for other job codes and their corresponding rates. For example:if [JobCode] = "4C03" then 2.50 else if [JobCode] = "5D04" then 3.00 else null
This way, you can create a custom column that evaluates multiple job codes and returns the appropriate billing rate based on your criteria.