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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ravi123
Frequent Visitor

Getting Error message while expanding the table after passing URL to invoke custom function

Hi Experts,

 

I have a column which contain URL and i passed it to invoke custom function, when i tried to expand the table i am getting an error message and getting stuck in the row which has error message, i need to handle exception message and continue fetching  the data for all the other rows.

My Custom function :
= (Url as text) as table =>
let
Source = Table.FromColumns({Lines.FromBinary(AzureStorage.BlobContents("" & Url), null, null, 1252)})
in
Source

Table-1Table-1Actual Data from URL  - 2Actual Data from URL - 2Error Details  -3Error Details -3

2 REPLIES 2
PhilipTreacy
Super User
Super User

Hi @Ravi123 

 

Use try .. otherwise to handle the error

 

= (Url as text) as table =>
let
Source = try Table.FromColumns({Lines.FromBinary(AzureStorage.BlobContents("" & Url), null, null, 1252)}) otherwise null
in
Source

 

 

Further reading if you wish

 

Handling errors in power query with try otherwise

 

regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi @PhilipTreacy I tried it but it is not working getting the same error.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors