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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AchalDesai
New Member

Replace Error with a Table of Values

Hi All,

I am creating a Currency Exchange Rates Table with a Web.BrowserContents query function (Basically passing the date in the URL to a currency exchange website and fetching the HTML table of exchange rates for that date).

The result of the function is a table with Columns Currency, Units Per EUR, EUR per Unit.

Sometimes however, it so happens that the data for a particular date isn't returned and and ERROR value is shown for that date instead of a table.

What I want to do is replace the ERROR with a static table of the 170 currency pairs with the values for Units Per EUR and EUR Per Unit as 0. 

This is so that when I merge the EchangeRate table with my main query, the error is not transferred and break the query. Instead the Value would be shown as 0.

AchalDesai_0-1630497311653.png

 

Hope you guys can help me with this.

 

4 REPLIES 4
Fowmy
Super User
Super User

@AchalDesai 

Use the Try - - - Otherwise error handling option : https://docs.microsoft.com/en-us/power-query/handlingerrors

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy, The try and otherwise definitely looks helpful.

But can you guide me how I could insert a table of 2 columns and 170 rows in the otherwise part?

Anonymous
Not applicable

Hi @AchalDesai ,

 

You can try to merge or append, please kindly refer to

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

Best Regards,

Stephen Tao

 

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

@AchalDesai 

If you could provide a PBIX file with some sample data then it would be helpful for me to try a solution .

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.