1

I have placed all the queries that I want to append as a new query in one group. I might add a few more in the future. So is there a way we can edit the code to include all the queries in the group

Gangula
  • 5,193
  • 4
  • 30
  • 59

1 Answers1

1

I'm not sure it's currently possible to do this exactly how you want, but there are some possible workarounds.

One possibility is to use the #shared space and pick out the tables that you want. Try playing around with the query below where {"Column1", "Column2", ... } is the list of column names in the group of queries that you want to append together.

let
    Shared = Record.ToTable(#shared),
    #"Added Custom" = Table.AddColumn(Shared, "Custom", each try Table.ColumnNames([Value]) = {"Column1", "Column2", ... }),
    #"Expanded Custom" = Table.ExpandRecordColumn(#"Added Custom", "Custom", {"Value"}, {"HasCols"}),
    #"Filtered Rows" = Table.SelectRows(#"Expanded Custom", each ([HasCols] = true)),
    #"Expanded Value" = Table.ExpandTableColumn(#"Filtered Rows", "Value", {"Column1", "Column2", ... }, {"Column1", "Column2", ... })
in
    #"Expanded Value"
Alexis Olson
  • 38,724
  • 7
  • 42
  • 64