Forum Discussion
Anonymous
4 years agoNot applicable
Error Handling (like Try-Catch in SQL)
Hey guys, in my project i have a huge sales dashboard with many data sources and querries (SQL-Database, Web-API, OData-Feed, Excel...). One data source is a excel file. The dashboard is live, im...
- 4 years ago
Hi Anonymous ,
To do this at the code level in M, you use the try...otherwise structure e.g.
try [Value] / 10 otherwise nullTo do this at the whole query level you can try these methods:
Ensure columns always present:
Handle source qury errors:
https://blog.crossjoin.co.uk/2014/09/18/handling-data-source-errors-in-power-query/
Make sure to read the comments after each of these blogs carefully, as other users add crucial amendments to the original code.
Pete
Anonymous
4 years agoNot applicable
Thanks to all for your help. This was a great start/input to solve m problems 😉