Forum Discussion
gwizzer
10 years agoNew Member
Append Query (does not work when primary query is empty)
I have two queries which may or may not return rows. However, if the primary query is empty then when a refresh is issued there is an error Column 'anycolumn' in Table 'primaryTable' contains blan...
ImkeF
10 years agoCommunity Champion
you can perform "sort of" conditional code branching like described here: http://community.powerbi.com/t5/Community-Blog/Conditional-Code-Branching-in-Power-BI-Query-if-then-else-gt/ba-p/39998
Just wrap your existing appdend-step into sth like this:
AppendStep = try Table.Combine({Table1, Table2}) otherwise Table2
We're not using "if-then-else" here, because we have to deal with an error message. Therefore: "try-otherwise"