Forum Discussion

hctrgrc's avatar
hctrgrc
Frequent Visitor
2 years ago
Solved

Add an exhange rate column from one query to another

Hello, I'm still new to Power Query and I wanted to ask what would be the best solution to the following case:  I have my first main data set [VENTAS] where I have sales ("Ventas" in Spanish) by d...
  • Caelan's avatar
    2 years ago

    So where ventas USD is blank, you need to get the exchange rate on the day of the sale from the exchange rate table, and give the USD value of the sale? I assume you're recording the date of the sale in the sale table?

     

    If you want to do this in power query, I would filter euros out of the exchange rate table, then merge the tables based on the date, and create a calculated column for the USD conversion. You can then delete the exchange rate column if you won't be using it again. Is there any reason why the actual values in the sales table should differ from the Mexican Peso * USD exchange rate? If so, you can keep any actual values with a conditional column. If not, might aswell just calculate all of them?