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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
lucadelicio
Impactful Individual
Impactful Individual

Extract data from different html page with same structure

Hi everyone,

i need to extract data from n html page that have the same structure.

To do this from one html page i use this code and everything is ok.

HERE THE PBIX FILE: https://we.tl/t-716e0SnwyE

 

 

let
    Source = Web.BrowserContents("https://www.borsaitaliana.it/borsa/etf/scheda/IE00BK5BQT80.html?lang=it"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", ".-outside-rl STRONG"}, {"Column2", ".-pb TD + *"}}, [RowSelector=".-pb TR"]),
    #"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Column1", type text}, {"Column2", type text}}),
    #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Column1]), "Column1", "Column2")
in
    #"Pivoted Column"

 

 

 


The result is a table with many columns and the correct data.

 

What i need is to create a table that contains in the rows the data extracted from many url listed in a table.
I have a table that contains the ISIN and the URL from wich i need to extract the data:

ISINURL Html Page
IE00BK5BQT80https://www.borsaitaliana.it/borsa/etf/scheda/IE00BK5BQT80.html?lang=it
IE00BDDRF700https://www.borsaitaliana.it/borsa/etf/scheda/IE00BDDRF700.html?lang=it
IT0005441883https://www.borsaitaliana.it/borsa/obbligazioni/mot/btp/scheda/IT0005441883.html?lang=it


What i need is to append automatically the data from all the url in a table result.

Someone can help me?
Thank you in advice.
I hope i'll be clear.



Luca D'Elicio

LinkedIn Profile
1 REPLY 1
lbendlin
Super User
Super User

Your last URL is invalid.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nQ1MHDyNnUKDLEwUNJRyigpKSi20tcvLy/XS8ovKk7MLEnMyUzMS9TLLNEHC+inlqTpFydnpKYk6iNr1ssoyc2xz0nMS7fNLFGK1YEa7eIS5GZuQKbRUM1YjA4xMDAwNTExtLAwJs7o/KSknMz0xKrM/LxM/dx8oHBJAdwuJNPQ7IoFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ISIN = _t, #"URL Html Page" = _t]),
    Fetch = (url)=>
    let
        Source = Web.BrowserContents(url),
        #"Extracted Table From Html" = Html.Table(Source, {{"Column1", ".-outside-rl STRONG"}, {"Column2", ".-pb TD + *"}}, [RowSelector=".-pb TR"]),
        #"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Column1", type text}, {"Column2", type text}}),
        #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Column1]), "Column1", "Column2")
    in
        #"Pivoted Column",
    #"Added Custom" = Table.AddColumn(Source, "Custom", each Fetch([URL Html Page])),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Apertura", "Max oggi", "Min oggi", "Prezzo asta di chiusura", "Numero Contratti", "Controvalore", "Volume totale", "Prezzo di riferimento", "Max Anno", "Min Anno", "Performance 1 mese", "Performance 6 mesi", "Performance da inizio anno", "Performance 1 anno", "Tipo strumento", "Classe", "Codice Alfanumerico", "Codice Isin", "Lotto Minimo", "Commissioni totali annue", "Valuta di Denominazione", "Emittente", "Segmento", "Benchmark", "Stile Benchmark", "Area Benchmark", "Dividendi", "SFDR", "iNAV - Bloomberg Ticker"}, {"Apertura", "Max oggi", "Min oggi", "Prezzo asta di chiusura", "Numero Contratti", "Controvalore", "Volume totale", "Prezzo di riferimento", "Max Anno", "Min Anno", "Performance 1 mese", "Performance 6 mesi", "Performance da inizio anno", "Performance 1 anno", "Tipo strumento", "Classe", "Codice Alfanumerico", "Codice Isin", "Lotto Minimo", "Commissioni totali annue", "Valuta di Denominazione", "Emittente", "Segmento", "Benchmark", "Stile Benchmark", "Area Benchmark", "Dividendi", "SFDR", "iNAV - Bloomberg Ticker"})
in
    #"Expanded Custom"

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors