Forum Discussion

stever78's avatar
stever78
Brass Contributor
Jul 11, 2022
Solved

APPEND query - can we still get it to work even if one of the queries in the append has not loaded ?

 

Hi all, would really appreciate your help.

 

I Have an APPEND power query , that appends 16 other power queries.

 

On occasion one or two of the "other" queries (that the append uses) do not load due to thier own source table not being available

(that is fine , its not ideal, but sometimes will happen, no problems)

 

so can i get the APPEND query to still work and show results for the 14 other power queries that DO HAVE data and have loaded.

 

At present the APPEND just says , "expression error the KEY doesnt match any rows in the table". (obviously becuase 2 of those queries in the APPEND hasn't loaded) 

 

is this possible to sort of tell the append - just load the tables that you DO have data for ???

A sort of SKIP queries that didnt load and continue to produce and refresh the ones that DID load ?

 

many , many, thanks for your help. Steve R

 

unfortunately i cannot attach my worksheet due to data protections

  • stever78 

    As workaround we may add dummy table, easiest way from here

    and modify the script as

    let
        tablesToCombine = {dummy, Table1, Table2, Table3, Table4},
        toTable = Table.FromList(tablesToCombine, Splitter.SplitByNothing() ),
        noErrors = Table.RemoveRowsWithErrors(toTable, {"Column1"}),
        #"Removed Top Rows" = Table.Skip(noErrors,1),
        Source = Table.Combine(#"Removed Top Rows"[Column1])
    in
        Source

    Perhaps there is more elegant solution, will try to play with is some later. Test file is attached.

  • stever78 

    As variant

    let
        tablesToCombine = {Table1, Table2, Table3, Table4},
        toTable = Table.FromList(tablesToCombine, Splitter.SplitByNothing() ),
        noErrors = Table.RemoveRowsWithErrors(toTable, {"Column1"})[Column1],
        Source = Table.Combine(noErrors)
    in
        Source

    adding first 3 rows in Advanced Editor

    • stever78's avatar
      stever78
      Brass Contributor
      Sergie, i have said it before but ill say it again, you are a star!! very well done and many thanks this has worked perfectly

Resources