The measure below is selecting the month prior to the current context.
The Currency table has the last day of each month with the respective currency and conversion value on each row
The DELIVERY table has daily records.
The measure shown below is returning the conversion value for the respective currency for the month prior. Example would be that DELIVERY context is July, returned currency value is June
I tried some variants of the measure to no avail.
I even tried substituting he following but it didn’t work either
ENDOFMONTH(Currency[Date]) < DELIVERY[ACTUAL_DATE]
Likewise changing the operator from < to > returns the next month from the currency table.
Currency[Date] > DELIVERY[ACTUAL_DATE]
Currency Conv = SUMX( DELIVERY[DELIV_AMOUNT] * LOOKUPVALUE( Currency[Value], Currency[Currency], DELIVERY[CURRENCY], Currency[Date], LASTDATE( FILTER( ALL( Currency[Date]), Currency[Date] < DELIVERY[ACTUAL_DATE] ) ) ) )
below is the Currency Table, The current context is June but the measure returns the currency values for May