Use exchange rate according to date

hi,

I struggle to solve following problem…

I have a table with exchange rates and its date
I want to convert amounts in the table “invoices” according the date of an invoice…
the rate should be used, if If the date of an invoice is later than the date of the exchange rate

I hope the description of my problem is clear enough

Hi @Konsztantinosz_Dulasz,
I provided an implementation in the document you shared.

Here is the formula:

[exchange rate].Filter(Date<=thisRow.date) // take all exchange dates bigger (or equal) than the invoice date
  .Sort(False(), [exchange rate].Date) // sort them descending
    .First() // take the first one

In plain English:
Please, give me the biggest of the dates that are smaller than my row date.

I hope this helps.
Cheers!

1 Like

this time I got closer to the solution, but not close enough :sweat_smile:
thanks again Federico :raised_hands:t2:

Next time you’ll rock! :upside_down_face: