Forum Discussion
Bartoli92
3 years agoNew Member
Append query only if previous queries find their data source
Hello, I would like to have your help on a problem that I've progressed on without managing to fully solve it. My model uses a structure of queries to update. To update, the model has let...
BA_Pete
Super User
3 years agoHi Bartoli92 ,
I think you probably need to create empty tables in each of your source queries to use as an alternative when a connection can't be made. Chris Webb writes about it here:
https://blog.crossjoin.co.uk/2014/09/18/handling-data-source-errors-in-power-query/
Make sure to read the comments from Ken Puls as well. He adds a critical update to this method.
TL;DR:
Create your Source step as usual.
Create an alternate source step that generates an empty tablewith the same columns as Source:
AlternativeOutput = #table(type table [Month = text, Product = text, Sales = Int64.Type]
You should then be able to create a 'try Source otherwise Alternative' step.
Pete