Forum Discussion

SevanT's avatar
SevanT
Frequent Visitor
1 year ago
Solved

Function currency conversion

Hi Community,   I am new here and have been using PowerQuery more and more.    Currently I am struggling with finding a solution to convert amounts from one currency to another. I have created a ...
  • Omid_Motamedise's avatar
    Omid_Motamedise
    1 year ago

    You can use Record.Field as below

    (sourceCurrency as text, Amount_Currency as number, column as text )=>
    let
    Source = tbFXRates,
    FXRate = Record.Field(Table.SelectRows(Source, each ([Currency] = sourceCurrency )){0},Column),
    Conversion = Value.Divide(Amount_Currency,FXRate)
    in
    Conversion