Forum Discussion
Getting the right exchange rate
- 9 years ago
You can try with these two formulas. If it still can't work, please give us a sample with all the columns and some data.
RatesWeWant = LOOKUPVALUE ( 'Exchange Rate'[c2g__Rate__c], 'Exchange Rate'[Currency name], 'Timecard Split'[CurrencyIsoCode], 'Exchange Rate'[OwnerCompany], "Y", 'Exchange Rate'[c2g__StartDate__c], LASTDATE ( FILTER ( ALL ( 'Exchange Rate'[c2g__StartDate__c] ), 'Exchange Rate'[c2g__StartDate__c] < 'Timecard Split'[pse__End_Date__c] ) ) )RatesWeWant = LOOKUPVALUE ( 'Exchange Rate'[c2g__Rate__c], 'Exchange Rate'[Currency name], 'Timecard Split'[CurrencyIsoCode], 'Exchange Rate'[OwnerCompany], 'Timecard Split'[OwnerCompany], 'Exchange Rate'[c2g__StartDate__c], LASTDATE ( FILTER ( ALL ( 'Exchange Rate'[c2g__StartDate__c] ), 'Exchange Rate'[c2g__StartDate__c] < 'Timecard Split'[pse__End_Date__c] ) ) )Best Regards,
Herbert
You might look at generating your exchange rate table such that it includes all dates with the appropriate exchange rate. Then you could do a simple relationship. Failing that, you should be able to do a "lookup" to the exchange rate table to find the MAX date that is less than the date in your timecard.
- Voose9 years ago
Helper III
Hey Greg_Deckler,
Can't create a relationship I'm afraid, but I did try the lookup... Keeping it simple to begin with and exclusing the dates part (New to using lookups)
I have used this -> Exchange rate = LOOKUPVALUE('Exchange Rate'[c2g__Rate__c],'Exchange Rate'[Currency name],'Timecard Split'[CurrencyIsoCode])
I was hoping this would just give me an exchange rate as a test, but I assume that this isn't working because it is returning multiple values?