Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Paulyeo11
Impactful Individual
Impactful Individual

How to import daily exchange rate table to PBI ?

Hi All

Can some one share with me some link on how to get the exchange rate table from web ? what is need to track exchange rate for SGD vs EURO and SGD vs USA

Paul

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Paulyeo11 ,

 

This is a web page about exchange rates. You can choose to get the data source from the web page in Power BI Desktop.

 

1.In Power BI Desktop, select Get Data > Web from the Home ribbon.

12.png

 

2.Enter the URL of the web page.

13.png

 

3.Once you’ve typed in (or pasted) the URL, select OK

14.png

 

4.You can select Load data or Transform data.

15.png

 

 

Tips: 

Getting data from a web page lets users easily extract data from web pages, and import that data into Power BI Desktop. Often however, data on Web pages aren't in tidy tables that are easy to extract. Getting data from such pages can be challenging, even if the data is structured and consistent.

There's a solution. With the Get Data from Web by example feature, you can essentially show Power BI Desktop which data you want to extract by providing one or more examples within the connector dialog. Power BI Desktop gathers other data on the page that match your examples. With this solution you can extract all sorts of data from Web pages, including data found in tables and other non-table data. Please refer to: Get webpage data by providing examples.

 

 

Reference:

Connect to webpages from Power BI Desktop

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
ddecoene
Frequent Visitor

v-stephen-msft
Community Support
Community Support

Hi @Paulyeo11 ,

 

I edited my previous reply, please check if my reply is helpful to you, thank you.

 

Best Regards,

Stephen Tao

Hi Stephen

Thank you so much for your sharing.

Paul

v-stephen-msft
Community Support
Community Support

Hi @Paulyeo11 ,

 

This is a web page about exchange rates. You can choose to get the data source from the web page in Power BI Desktop.

 

1.In Power BI Desktop, select Get Data > Web from the Home ribbon.

12.png

 

2.Enter the URL of the web page.

13.png

 

3.Once you’ve typed in (or pasted) the URL, select OK

14.png

 

4.You can select Load data or Transform data.

15.png

 

 

Tips: 

Getting data from a web page lets users easily extract data from web pages, and import that data into Power BI Desktop. Often however, data on Web pages aren't in tidy tables that are easy to extract. Getting data from such pages can be challenging, even if the data is structured and consistent.

There's a solution. With the Get Data from Web by example feature, you can essentially show Power BI Desktop which data you want to extract by providing one or more examples within the connector dialog. Power BI Desktop gathers other data on the page that match your examples. With this solution you can extract all sorts of data from Web pages, including data found in tables and other non-table data. Please refer to: Get webpage data by providing examples.

 

 

Reference:

Connect to webpages from Power BI Desktop

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Stephen

I just try to download the exchange rate , it work fine. Thank you very much.

May i know how to download last 3 year exchange rate ? for example SGD to EURO.

Paul

 

amitchandak
Super User
Super User

@Paulyeo11 , Refer if this video can help

https://www.youtube.com/watch?v=9oPFgHvGyKc

https://www.youtube.com/watch?v=_ubNovnNx5k

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
mahoneypat
Microsoft Employee
Microsoft Employee

This is probably done using one of the free REST APIs out there for exchange rates (you would need to sign up and get a token), but you can also scrape it off a webpage with parameter inputs.  Below is an example.  Create two new blank queries and paste each of the code snippets below into them separately (replacing the text that is there).  The first is a function that makes the weball and the second is an example of how to use it to pull SGD/USD/EUR rates.  You would just need to use the function in your table that has Currency1 and Currency2 values (USD, SGD, etc.).

(Currency1, Currency2)=>
let
    Source = Web.BrowserContents("https://www.xe.com/currencyconverter/convert/?Amount=1&From=" & Currency1 & "&To=" & Currency2),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE.XeTable-iKdsnZ.cDpLwI.ConversionTable-iZxPqc.dbfNjJ.currencyconversiontable > * > TR > :nth-child(1)"}, {"Column2", "TABLE.XeTable-iKdsnZ.cDpLwI.ConversionTable-iZxPqc.dbfNjJ.currencyconversiontable > * > TR > :nth-child(2)"}}, [RowSelector="TABLE.XeTable-iKdsnZ.cDpLwI.ConversionTable-iZxPqc.dbfNjJ.currencyconversiontable > * > TR"]),
    #"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Column1", type text}, {"Column2", type text}}),
    Custom1 = Text.BeforeDelimiter(#"Changed Type"{1}[Column2], " ")
in
    Custom1


let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCnZ3UdJRCg12UYrVgfFcQ4OUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Currency1 = _t, Currency2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Currency1", type text}, {"Currency2", type text}}),
    #"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "fnER", each fnER([Currency1], [Currency2]))
in
    #"Invoked Custom Function"

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.