Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I need help with this issue.
I have a weekly exchange rate report, it is downloaded every saturday..
Then in the report if I need a exchange rate of Monday or Tuesday by example is necesary use the last valid exchange rate downloaded.
By Example:
The exchange rate used for the day 07/13/2020 must be 1.131850 (Downloaded on 07/11/2020). that is the last vlid exchange rate
Somebody know how do it?
This is the table i have:
Date | Currency From | Currency To | Date IN JDE | Exchange Rate |
7/10/2020 | EUR | USD | ||
7/11/2020 | EUR | USD | 7/11/2020 | 1.131850 |
7/12/2020 | EUR | USD | ||
7/13/2020 | EUR | USD | ||
7/14/2020 | EUR | USD | ||
7/15/2020 | EUR | USD | ||
7/16/2020 | EUR | USD | ||
7/17/2020 | EUR | USD | ||
7/18/2020 | EUR | USD | 7/18/2020 | 1.142250 |
7/19/2020 | EUR | USD | ||
7/20/2020 | EUR | USD | ||
7/21/2020 | EUR | USD | ||
7/22/2020 | EUR | USD | ||
7/23/2020 | EUR | USD | ||
7/24/2020 | EUR | USD | ||
7/25/2020 | EUR | USD | 7/25/2020 | 1.162550 |
Solved! Go to Solution.
@gomezc73 , locate the attachment with the solution.
@gomezc73 , locate the attachment with the solution.
Hello, I tried using
Perfect!!!. That's just what i needed.. You are a genious!!
Hi,
In the report which you download every Saturday, is there a "Date of download" column?
Hello
Yes, the first column is the calendar date, and the fourth column is the date on which the Exchange Rate was obtained.
when I search for
it only gets me the exchange rate of the Saturdays and the rest of days is blank, so I need to repeat that exchange rate for the next few days, until I get the exchange rate for the next Saturday and so on.
Calendar Date | Currency From | Currency To | Download Date | Exchange Rate |
1/6/2018 | AED | USD | 1/6/2018 | 0.272300 |
1/7/2018 | AED | USD | 0.272300 | |
1/8/2018 | AED | USD | 0.272300 | |
1/9/2018 | AED | USD | 0.272300 | |
1/10/2018 | AED | USD | 0.272300 | |
1/11/2018 | AED | USD | 0.272300 | |
1/12/2018 | AED | USD | 0.272300 | |
1/13/2018 | AED | USD | 1/13/2018 | 0.272300 |
1/14/2018 | AED | USD | 0.272300 | |
1/15/2018 | AED | USD | 0.272300 | |
1/16/2018 | AED | USD | 0.272300 | |
1/17/2018 | AED | USD | 0.272300 | |
1/18/2018 | AED | USD | 0.272300 | |
1/19/2018 | AED | USD | 0.272300 | |
1/20/2018 | AED | USD | 1/20/2018 | 0.272300 |
@gomezc73 - Can you use Fill Down in Power Query? Otherwise, if you are doing a column, you could do something like:
Final Exchange Rate =
IF(
[Exchange Rate] <> "",
[Exchange Rate],
VAR __Date = MAXX(FILTER('Table',[Calendar Date] < EARLIER([Calendar Date]) && [Currency From] = EARLIER([Currency From]) && [Currency To] = EARLIER([Currency To]) && [Exchange Rate] <> ""),[Calendar Date])
RETURN MAXX(FILTER('Table',[Calendar Date] = __Date),[Exchange Rate])
Somehow though, not sure we are all starting from the same place you are.
@gomezc73 - You are basically looking at Lookup Min/Max kind of - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
In your case,
Measure =
VAR __Date = MAX('Table'[Date])
VAR __RateDate = MAXX(FILTER('ExchangeRates',[Date]<=__Date && [Exchange Rate] <> ""),[Date])
RETURN
MAXX(FILTER('ExchangeRates',[Date] = __RateDate),[Exchange Rate])
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
87 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
124 | |
107 | |
60 | |
55 |