The 2nd Edition of #25daysofdaxfridays challenge is here!
How can we help?

Welcome to Curbal Learning Portal. Search for answers using the search box below,
or create a request for a video or blog if you cannot find your answer.

Popular searches: DAX Glossary | Guided courses | Request a video


CSS not found on new Power BI/Query web connector?

Are you having issues with the new connector?

No problem, In this video I will show you how to help Power Query scrape websites that you couldn’t do before and where you are getting the following error:
No CSS selector was found for the sample values you provided.

Watch the tutorial:

CSS not found on new Power BI web connector?  😬

Additional info

If you are getting the following error:

“No CSS selector was found for the sample values you provided” when you are using the new web connector in Power BI, it means that power query has not manage to download all the html code as the site didn’t load before that snapshot was made.

To go around that, you can actually, add a WaitFor parameter that will wait either for the page to load completely or for some html code to load before it grabs the html code.

Here are some examples:
// Wait for ten seconds [WaitFor = [Timeout = #duration(0,0,0,10)]]
// Wait for to appear (with a default 30-second timeout that will throw if hasn’t shown up yet) [WaitFor = [Selector = “”]]
// Wait for to appear with a ten second timeout [WaitFor = [Selector = “”, Timeout = #duration(0,0,0,10)]]

Here are the modified functions that should unblock the two sites you tried: · = Web.BrowserContents(“”, [WaitFor=[Selector=”li.ifmenu-all”]]) · = Web.BrowserContents(“”, [WaitFor=[Selector=”div.dataTables_paginate”]])

Links to the mentioned resources

Get file #28 in the Community Downloads folder at Curbal Download center

Was this helpful?

Reader Interactions

Let us know your thoughts...

Table of Contents