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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
maasool
Helper I
Helper I

Query info from web not in a table

Is there any way to query the latest stock price from this web page? https://www.gettex.de/en/gettex-die-schnelle-und-guenstige-boerse/?isin=IE00B4WXJH41&name=ishares-eu...

Circled with blue on the picture

maasool_0-1691414996032.png


It is not shown in any tables, when you query this page.

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @maasool ,

 

You need to find the current value using the "Get from examples" option, then PQ writes the HTML location for you:

let
    Source = Web.BrowserContents("https://www.gettex.de/en/gettex-die-schnelle-und-guenstige-boerse/?isin=IE00B4WXJH41&name=ishares-eur-govbd10-15yr-ueeur-d&token=4f37389707b01bef874ca4d47e99bf80"),
    extractPriceHTML = Html.Table(Source, {{"Column1", ".stock-details > DIV > :nth-child(2)"}}),
    addGetNumerical = Table.AddColumn(extractPriceHTML, "getNumerical", each Text.Select([Column1], List.Combine({{"0".."9"}, {","}}))),
    chgTypeWithLocale = Table.TransformColumnTypes(addGetNumerical, {{"getNumerical", type number}}, "de-DE")
in
    chgTypeWithLocale

 

Example query output:

BA_Pete_0-1691499022729.png

 

I've done a bit of formatting to get the output into my regional format ("." instead of ","), but once you get the value into PQ, you can do whatever you want with it.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
BA_Pete
Super User
Super User

Hi @maasool ,

 

You need to find the current value using the "Get from examples" option, then PQ writes the HTML location for you:

let
    Source = Web.BrowserContents("https://www.gettex.de/en/gettex-die-schnelle-und-guenstige-boerse/?isin=IE00B4WXJH41&name=ishares-eur-govbd10-15yr-ueeur-d&token=4f37389707b01bef874ca4d47e99bf80"),
    extractPriceHTML = Html.Table(Source, {{"Column1", ".stock-details > DIV > :nth-child(2)"}}),
    addGetNumerical = Table.AddColumn(extractPriceHTML, "getNumerical", each Text.Select([Column1], List.Combine({{"0".."9"}, {","}}))),
    chgTypeWithLocale = Table.TransformColumnTypes(addGetNumerical, {{"getNumerical", type number}}, "de-DE")
in
    chgTypeWithLocale

 

Example query output:

BA_Pete_0-1691499022729.png

 

I've done a bit of formatting to get the output into my regional format ("." instead of ","), but once you get the value into PQ, you can do whatever you want with it.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Impressive, got it working by using your code! From where is this "Get from examples" option accessible in power query? Also, did this thing wrote the code itself or did you write it?

 

Power BI writes the HTML location itself once you identify the value you're looking for. I wrote the [getNumerical] column to format into a proper number.

 

In the HTML browser (after you've pasted your URL into the Web connector), click here:

BA_Pete_1-1691564450820.png

 

You'll get a preview of the page and an editable table below. Use the preview to identify the value you want (as of now, 147,085):

BA_Pete_3-1691564611998.png

 

Double-click in the first cell of the table below (you can repeat in the cells below if you want more single values) and you'll see a list of values generated by PQ based on all the HTML locations in the page code. Choose the value you want and PQ will take the HTML location for that item and put it into the Html.Table() function for you:

BA_Pete_4-1691564783061.png

 

 

BA_Pete_5-1691564865004.png

 

Hit the 'Transform Data' button to bring it into PQ and be able to transform/manipulate the value you've selected.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Simply amazing! Thank you very much!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.