I am trying to convert all spend on a report from different currencies to USD so all spend is in the same currency for my report. I was able to get the exchange rates into my table but now when I create the case when operator I am getting an error when I add the calculation to multiply the line total to the exchange rate. Here is my code so far. Any suggestions on how I can calculate the exchange rate within my case when operator so it doesn't throw an error?
ol = order line
er = exchange rate
,case when ol.currency_code = 'USD' then ol.total * '1' else ol.total * er.rate end Converted_Total