I'd first join the two files together where the type codes matched. But I'd make it a left join so that I kept all Expenditures, even if there wasn't a matching Rate Code:
You can see here, that I'll keep all 9 expenditures in the Expenditure file, even though only one rate code matched.
Then, I'd add a Step to do the calculation:
The calculation in Tableau Prep would be something like:
[Actual Expenditure Amount] * (1 + ZN([Rate]))
Which is similar to what you have above, but I"ve included a ZN() function to turn any NULL values (where the lookup didn't work) to 0 so the result is the original amount * 1 = the original amount.
I've attached a packaged flow with sample data that you can download and check out.
VLOOKUP_in_Prep.tflx 8.4 KB