Forum Discussion
Beginner - exchange rate API
- 5 years ago
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.
Just had a look at their site and under FAQ, it states
If you have a key, you should try the Web API auth
This worked fine in my test;
Here's the query
let
Source = Json.Document(Web.Contents("http://api.exchangeratesapi.io/v1/" & "2021-07-19?" & "access_key=<ENTER KEY HERE>" & "&symbols=USD,AUD,CAD,PLN,MXN&format=1")),
#"Converted to Table" = Table.FromRecords({Source}),
#"Expanded rates" = Table.ExpandRecordColumn(#"Converted to Table", "rates", {"USD", "AUD", "CAD", "PLN", "MXN"}, {"rates.USD", "rates.AUD", "rates.CAD", "rates.PLN", "rates.MXN"})
in
#"Expanded rates"
By the way- Not a good idea to share the API key-
- DennisSchlein5 years agoHelper III
Hi NickA01 ,
I'm sorry, I must be the worst BI worker in the world.
I cant even get to add json as data source: when trying to link to a URL i get some chrome error 😕would you mind sharing your model?
- Shahebaz_Shaikh2 years agoNew Member
NickA01 Sir, which is your base currency? I am successfully able to run your above code. But your base currency in EUR as i notice is that right?
and i want base currency in USD. How can I do that. Can you please help me with that?
- NickA012 years agoResolver III
Shahebaz_Shaikh
if you check the documentation page on the exchangeratesapi website, they advise how to set different base currencies
EURO is the default.this should do what you need
- Shahebaz_Shaikh2 years agoNew Member