Forum Discussion
PowerEnthusiast
4 years agoHelper I
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...
- 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
PowerEnthusiast
4 years agoHelper I
Hi amitchandak
The dates are in different tables - how do I look up from the Sales table to the Exchange Rate table?. Also, I don't think I will be able to reference a column for the dates in the query above. Seems to only want measures.
V-lianl-msft
4 years agoCommunity Support
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