Forum Discussion

Mike40uk's avatar
Mike40uk
Regular Visitor
9 years ago
Solved

Check table exists before combine

I am trying to combine a list of tables which may change depending on the amount of orders.

I have managed to test each table with 'try' and ended up with a list of tables that are valid I need to combine. (Query1)

 

 

When I get to the combine I can not use this list  it either returns the table itself or comes up with the error 'We cannot convert a value of type Table to type List.'

let
    Source = Table.Combine({Query1})
in
    Source

 

 

 

If I do it manually as below it works.

 

let
    Source = Table.Combine({UKAHL,ITBVG,UKJR})
in
    Source

 

 

  • It looks like your Query1 doesn't result in a list of Tables, like in the following example:

     

5 Replies

  • MarcelBeug's avatar
    MarcelBeug
    Community Champion

    Probably you should remove the curly braces:

     

    let
        Source = Table.Combine(Query1)
    in
        Source
    • Mike40uk's avatar
      Mike40uk
      Regular Visitor

      Thanks for comments,  I have tried that and that is when I get the error

       

      Expression.Error: We cannot convert a value of type Table to type List.
      Details:
          Value=Table
          Type=Type

      • MarcelBeug's avatar
        MarcelBeug
        Community Champion

        It looks like your Query1 doesn't result in a list of Tables, like in the following example: