1. Load the latest rates
In Power BI Desktop: Get Data → Blank Query → Advanced Editor, and paste:
let
Source = Json.Document(Web.Contents(
"https://api.currencyapi.com/v3/latest",
[Query = [base_currency = "USD"], Headers = [apikey = "YOUR-API-KEY"]]
)),
Data = Record.ToTable(Source[data]),
Rates = Table.ExpandRecordColumn(Data, "Value", {"code", "value"}, {"Currency", "Rate"}),
Typed = Table.TransformColumnTypes(Rates, {{"Rate", type number}})
in
Typed
2. Load a daily history
The range endpoint returns a series of daily rates:
let
Source = Json.Document(Web.Contents(
"https://api.currencyapi.com/v3/range",
[Query = [base_currency = "USD", currencies = "EUR,GBP,JPY",
datetime_start = "2026-01-01", datetime_end = "2026-09-30"],
Headers = [apikey = "YOUR-API-KEY"]]
)),
Days = Table.FromList(Source[data], Splitter.SplitByNothing(), {"Day"}),
Expanded = Table.ExpandRecordColumn(Days, "Day", {"datetime", "currencies"}),
Rows = Table.ExpandListColumn(Table.AddColumn(Expanded, "Items", each Record.ToList([currencies])), "Items"),
Final = Table.ExpandRecordColumn(Rows, "Items", {"code", "value"}, {"Currency", "Rate"}),
Typed = Table.TransformColumnTypes(Final, {{"datetime", type date}, {"Rate", type number}})
in
Table.RemoveColumns(Typed, {"currencies"})
3. Convert sales to USD
Relate the rates table to your sales by date and currency (or merge the queries), then add a measure:
Sales USD = SUMX(Sales, Sales[Amount] / RELATED(Rates[Rate]))
With USD as the base, dividing by the rate converts each amount into US dollars.
The range endpoint is part of the Medium plan and above; with the free plan, load single days with the historical endpoint. See pricing.