This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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, important for the sales department in their daily work and is refreshed 3 times per day. I fear huge problems (the whole dashboard could crash?), if anyone changes things in excel (e.g. changing columns or changing the sheets).
I know from SQL or Python the error handling method "Try-Catch". My idea was, to implement something like that in the power querry for the excel querry.
Is this possible or do you have any other ideas for this problem?
Thanks for your help;)
Solved! Go to Solution.
Hi @Anonymous ,
To do this at the code level in M, you use the try...otherwise structure e.g.
try [Value] / 10 otherwise null
To 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
Proud to be a Datanaut!
Thanks to all for your help. This was a great start/input to solve m problems 😉
Hi @Anonymous ,
To do this at the code level in M, you use the try...otherwise structure e.g.
try [Value] / 10 otherwise null
To 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
Proud to be a Datanaut!
Ben Gribaudo also has a valuable article on error handling.
https://bengribaudo.com/blog/2020/01/15/4883/power-query-m-primer-part-15-error-handling
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.