Forum Discussion

PauNovaro's avatar
PauNovaro
Frequent Visitor
8 years ago
Solved

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

CurrencyDateKeyExchange rate
USDJuly21820.3
USDJune201818.9
USDMay201819.001
USDApril201818.65

 

Sales Data

AccountAmountAmount in USDDateKey
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

  • Anonymous's avatar
    Anonymous
    8 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

  • Anonymous's avatar
    Anonymous
    Not 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

    • PauNovaro's avatar
      PauNovaro
      Frequent Visitor

      Thank you Raj! It work perfectly!!