# Tricky One - Multiple Dates Used

#### swingr45

##### New Member
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!

### Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

#### scottsen

##### Well-known Member
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.

Replies
0
Views
708
Replies
4
Views
2K
Replies
3
Views
2K
Replies
1
Views
764
Replies
1
Views
673