Beginner - exchange rate API
Hi
I'm brand new to PBI, and i'm trying to find a solution to making a exchange rate table.
I found a model in here where the API endpoint has been updated.
Im trying to reach this endpoint :
http://api.exchangeratesapi.io/v1/2013-03-16?access_key=b5b562191a8c1fea37bcef334834395d&symbols=USD,AUD,CAD,PLN,MXN&format=1
And I have this code:
= (Date as text) => let
C=currency,
Source = Json.Document(Web.Contents("https://api.exchangeratesapi.io/v1/"& Date &"?access_key=b5b562191a8c1fea37bcef334834395d"&"?base="&C&"")),
rates = Source[rates],
#"Converted to Table" = Record.ToTable(rates),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Name", "Currency"}, {"Value", "Rate"}})
in
#"Renamed Columns"
But I get this error message:
Thanks in advance,
DennisSchlein
We are all always learning;
if you just open Advanced editor then you can replace your code with mine - remember to add in the key.
Get Data --> From Web -- Click on AdvancedAnother option to get data for multiple dates would be to use the timeseries mentioned in the documentation but this looks like it is dependent on the subscription you have.
Regarding getting data for different dates, as mentioned by amitchandak Chris Webbs cross join blog will help.