Forum Discussion

PowerEnthusiast's avatar
4 years ago
Solved

Exchange Rates and Dates

Hi Power BI Community, I am working on a dataset for exchage rates. However, the exchange rates have specific dates associated to the exchange rate. I have the following exchange rate table: Cu...
  • V-lianl-msft's avatar
    V-lianl-msft
    4 years ago

    Try to create a measure like below:

    SALE_ = 
    VAR _DATE = SELECTEDVALUE(Table2[Sale Date])
    VAR _RATE =  CALCULATE(MAX(Table1[Exchange Rate]),FILTER(Table1,Table1[Start Date]<=_DATE&&Table1[End Date]>=_DATE))
    RETURN SUM(Table2[Sale Price])*_RATE