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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
G-Salyer-13
New Member

How to ignore "Web query returned no data" error

I have the following querry but it sometimes gives the error "This Web query returned no data". I need to stop this error from being shown and if no data is returned, just leave the tables filled with the results of the last succesful querry. I produced this code using the Data - From Web button. 

 

let
Source = Web.Page(Web.Contents("https://tradingeconomics.com/commodities")),
Data1 = Source{1}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data1,{{"Metals", type text}, {"Price", type number}, {"Day", type number}, {"%", Percentage.Type}, {"Weekly", Percentage.Type}, {"Monthly", Percentage.Type}, {"YoY", Percentage.Type}, {"Date", type date}})
in
#"Changed Type"

2 REPLIES 2
v-xinruzhu-msft
Community Support
Community Support

Hi @G-Salyer-13 

You can use try.. otherwise function, you can refer to the following link.
Solved: Ignore Data source if fails to load - Microsoft Fabric Community

Solved: Append all queries that have no error - Microsoft Fabric Community

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I have no clue how to implement this into the code I posted. This is the code created by the Data - From Web button....

 

let
Source = Web.Page(Web.Contents("https://tradingeconomics.com/commodities")),
Data1 = Source{1}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data1,{{"Metals", type text}, {"Price", type number}, {"Day", type number}, {"%", Percentage.Type}, {"Weekly", Percentage.Type}, {"Monthly", Percentage.Type}, {"YoY", Percentage.Type}, {"Date", type date}})
in
#"Changed Type"

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors