littlespoon
Registered User.
- Local time
- Today, 08:30
- Joined
- Oct 7, 2015
- Messages
- 18
Hi,
This query is driving me insane and I'd love some advice.
So. I have a column giving a bunch of revenue values in different currencies, and I want to convert them all into GBP. These transactions are also over a period of time, so I need to convert them using the time-appropriate exchange rate.
In my table "Sales Data" I have a column 'Currency' which gives the currency, a column 'Transaction Date' which gives the date of transaction, and a column 'Revenue' which gives the value.
The currency lookup table "Currency Lookup" is arranged with months along the side and the different currency exchange rates in labelled columns. Each month is formatted as "01/mm/yyyy".
I want to say, for example:
Iif([Currency]='USD', [Revenue]/***The exchange rate given for USD in the month of this record's [Transaction date]***,"")
Also, I have ten different currencies to do this for, so rather than nest the Iif functions I'd like to have a series of functions, each checking for a different currency, and then to sum them at the end to one field 'Revenue'. How do I do this?
Also, I have a very limited understanding of SQL and work mostly in Design View; if someone can explain this to me using that I would be very grateful!
This query is driving me insane and I'd love some advice.
So. I have a column giving a bunch of revenue values in different currencies, and I want to convert them all into GBP. These transactions are also over a period of time, so I need to convert them using the time-appropriate exchange rate.
In my table "Sales Data" I have a column 'Currency' which gives the currency, a column 'Transaction Date' which gives the date of transaction, and a column 'Revenue' which gives the value.
The currency lookup table "Currency Lookup" is arranged with months along the side and the different currency exchange rates in labelled columns. Each month is formatted as "01/mm/yyyy".
I want to say, for example:
Iif([Currency]='USD', [Revenue]/***The exchange rate given for USD in the month of this record's [Transaction date]***,"")
Also, I have ten different currencies to do this for, so rather than nest the Iif functions I'd like to have a series of functions, each checking for a different currency, and then to sum them at the end to one field 'Revenue'. How do I do this?
Also, I have a very limited understanding of SQL and work mostly in Design View; if someone can explain this to me using that I would be very grateful!