Forum Discussion
Need Help with Calculations with conditions
Hello,
Need help on knowing how to correlate 2 tables. I´m trying to get the amount in USD dlls. I have 2 tables:
Currency Data
| Currency | DateKey | Exchange rate |
| USD | July218 | 20.3 |
| USD | June2018 | 18.9 |
| USD | May2018 | 19.001 |
| USD | April2018 | 18.65 |
Sales Data
| Account | Amount | Amount in USD | DateKey |
| 123 | $32,873 | ? | July218 |
| 456 | $71,623 | ? | June2018 |
| 678 | $8,731 | ? | May2018 |
| 912 | $8,172 | ? | April2018 |
How can I multiply the "Amount" times the "Exchange rate" depending on the month in which the sale has occur? I created the DateKey to have a reference.
Thanks !
Pau
- Anonymous8 years ago
1. Make a relationship based on the date key between these two tables. 1:Many type.
2. Create a calculated column AMount in USD= SalesData[Amount]*RELATED(Currency[Exchange Rate]
Hope this helps.
Thanks
Raj
2 Replies
- AnonymousNot applicable
1. Make a relationship based on the date key between these two tables. 1:Many type.
2. Create a calculated column AMount in USD= SalesData[Amount]*RELATED(Currency[Exchange Rate]
Hope this helps.
Thanks
Raj
- PauNovaroFrequent Visitor
Thank you Raj! It work perfectly!!