Tricky One - Multiple Dates Used

swingr45

New Member
Joined
Jul 28, 2014
Messages
13
A while back I needed help finding an exchange rate based on a filtered date. scottsen was able to help me and I adapted the answer he gave here http://www.mrexcel.com/forum/power-bi/794827-filter-sliced-date.html to the following formula:


Code:
(LOOKUPVALUE(ExchRates[Relational Exch_ Rate Amount],ExchRates[Starting Date],[Date],ExchRates[Currency Code],"AUD"))
Where "AUD" is the particular currency needed.

It is working great, but now I'm trying to use it in a month-on-month report. I've built the framework for cube formulas to fill in monthly budget and monthly actuals using the conversion. The problem is, to get the budget and actual entries for each month, I have to filter the formula for that month, which then filters the exchange rate to that month. I would like each month to be multiplied by the latest month selected's exchange rate.

That may not be too clear, so I'll try explaining another way.

Exchange Rates:
January = .024
February = .029
March = .033
April =.031

CURRENTLY:
If I filter on April, each of the 4 months' entries are brought into the corresponding column and multiplied by the corresponding exchange rate, i.e. January numbers are multiplied by .024, February by .029, etc...

WHAT I WANT:
If I filter on April, each of the 4 month's entries are bought into the corresponding column and multiplied by the April exchange rate, i.e. January numbers are multiplied by .031, February by .031, etc...

Then if I filter on March, the first 3 month's are brought into the corresponding column and multiplied by March, i.e. each multiplied by .033.


Is there a good way to achieve this or am I hoping for too much, which I expect that I am? Thanks!
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

scottsen

Well-known Member
Joined
Mar 16, 2014
Messages
1,263
This is certainly doable, though... hard for me to visualize w/o seeing, cuz, well, that's how I roll.

This reads pretty good to me though...

=CALCULATE(MIN(ExchRates), FILTER(ALL(ExchRates), ExchRates[MonthId] = Calendar[MonthId]))

That should return you the exchange rate related to whatever Calendar month is selected. I think. :)
 

Watch MrExcel Video

Forum statistics

Threads
1,113,835
Messages
5,544,592
Members
410,621
Latest member
S Oberlander
Top