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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply

Power Query: Combining multiple 'Web.BrowserContents' data sources into a single query

Hi everyone, I'm looking to create a report that queries multiple different pages of a website. I'm hoping I'll be able to combine them into a single query, rather than creating new data sources for each one. For example, I've used the code below in the past to query multiple sharepoint libraries:

 

 

let
  Source = Table.Combine(
        {
SharePoint.Tables("https://sharepoint.intranet.name/", [Implementation="2.0", ViewMode="All"]),
SharePoint.Tables("https://sharepoint.intranet.name/", [Implementation="2.0", ViewMode="All"])
        }
    ),

 

 

Is there an equivalent I can use to combine multiple web pages into a single query? Here's the query I have for a single page:

 

let
    Source = Web.BrowserContents("website address goes here"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", ".table TD + *"}, {"Column2", ".badge"}, {"Column3", ".hidden-sm + .hidden-xs + *"}, {"Column4", ".subject"}, {"Column5", ".hidden-xs .label:nth-child(1)"}, {"Column6", ".hidden-xs .label:nth-child(2)"}, {"Column7", ".hidden-sm:nth-child(3)"}, {"Column8", ".hidden-xs TR"}, {"Column9", ".hidden-sm .label:nth-child(1)"}, {"Column10", ".hidden-sm .label:nth-child(2)"}, {"Column11", ".badge *"}, {"Column12", ".hidden-xs .label:nth-child(3)"}, {"Column13", ".hidden-sm .label:nth-child(3)"}, {"Column14", ".hidden-xs + A *"}}, [RowSelector=".table TD + *"])
in
    #"Extracted Table From Html"

 

 

1 ACCEPTED SOLUTION

Thanks so much for your help @amitchandak , I found the answer here in the end! https://www.youtube.com/watch?v=VkDpwSGWPmk

View solution in original post

4 REPLIES 4
my1stmonkey
Regular Visitor

thanks for this, @amitchandak. I have a related issue - my report has many sources, so I'd like to combine using 

 

Source = #shared,
#"Converted to Table" = Record.ToTable(Source),

 

Combining the queries using the approach you outline above works, but combining the same queires using the #shared approach results in a blank table in the front end (the table renders as expected in the back end)

 

back end

my1stmonkey_1-1702550084271.png

 

front end

my1stmonkey_0-1702549927708.png

 

I've tried numerous settings, nothing seems to work. 

 

Any advice gratefully received!

Brunner_BI
Super User
Super User

If you want to refresh this query you will need to switch to Web.Contents instead of Browsercontents, just FYI

------------------------------------
Brunner BI focusing on Microsoft Power BI development and consulting
Developers of external tool "Measure Killer"
My blog

Thanks so much for your help @amitchandak , I found the answer here in the end! https://www.youtube.com/watch?v=VkDpwSGWPmk

amitchandak
Super User
Super User

@MichaelHutchens , Create mutiple code like

 

Source1 = <Code>

Source2 = <Code>

 

I usually get them in different queries and then put code in one place

 

then you can use append code

 

combine = Table.Combine(Source1, Source2, Source3)

in

combine

 

Also, refer

https://datachant.com/2016/06/27/cursor-based-pagination-power-query/

 

 

Code merge example

Merge Queries, Why not Merge the code: https://youtu.be/YOFs39RCPfQ

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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