Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello,
I am trying to import HTML tables data from the website mentioned below. Unfortunately I am able to import only the first 15 rows from first page/table. There are 19 pages/tables which pointing to the same link. How do I loop to the next page/table and extract data within same PBI?
Please suggest necessary changes to the 'M' code
URL: https://www.coronavirus.vic.gov.au/exposure-sites
| let Source = Web.BrowserContents("https://www.coronavirus.vic.gov.au/exposure-sites"), #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6)"}, {"Column2", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6)"}, {"Column3", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TH[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TD[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5)"}, {"Column4", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TH[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TD[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5)"}, {"Column5", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TH[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TH[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TD[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TD[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4)"}, {"Column6", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TH[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TH[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TH[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TD[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TD[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TD[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3)"}, {"Column7", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TH[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TH[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TH[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TD[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TD[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TD[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3)"}, {"Column8", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TH[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TH[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TH[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3) + TH[colspan=""1""]:not([rowspan]):nth-child(5):nth-last-child(2), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TD[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TD[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TD[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3) + TD[colspan=""1""]:not([rowspan]):nth-child(5):nth-last-child(2)"}, {"Column9", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TH[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TH[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TH[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3) + TH[colspan=""1""]:not([rowspan]):nth-child(5):nth-last-child(2) + TH[colspan=""2""]:not([rowspan]):nth-child(6):nth-last-child(1), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TD[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TD[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TD[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3) + TD[colspan=""1""]:not([rowspan]):nth-child(5):nth-last-child(2) + TD[colspan=""2""]:not([rowspan]):nth-child(6):nth-last-child(1)"}, {"Column10", "TABLE.rpl-search-results-table > * > TR > TH[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TH[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TH[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TH[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3) + TH[colspan=""1""]:not([rowspan]):nth-child(5):nth-last-child(2) + TH[colspan=""2""]:not([rowspan]):nth-child(6):nth-last-child(1), TABLE.rpl-search-results-table > * > TR > TD[colspan=""2""]:not([rowspan]):nth-child(1):nth-last-child(6) + TD[colspan=""2""]:not([rowspan]):nth-child(2):nth-last-child(5) + TD[colspan=""1""]:not([rowspan]):nth-child(3):nth-last-child(4) + TD[colspan=""2""]:not([rowspan]):nth-child(4):nth-last-child(3) + TD[colspan=""1""]:not([rowspan]):nth-child(5):nth-last-child(2) + TD[colspan=""2""]:not([rowspan]):nth-child(6):nth-last-child(1)"}}, [RowSelector="TABLE.rpl-search-results-table > * > TR"]), #"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", type text}, {"Column6", type text}, {"Column7", type text}, {"Column8", type text}, {"Column9", type text}, {"Column10", type text}}) in #"Changed Type" |
Any help would be appreciated!
Thanks
I would need to study the API documentation to understand the paging mechanism for this page. So please post the link to a description of this service.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @Anonymous , @ImkeF is great at m language!
Nathaniel
Proud to be a Super User!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 16 | |
| 14 | |
| 12 | |
| 7 | |
| 6 |