Search code examples
excelpowerbipowerquerypowerbi-desktopm

Passing table source as variable - Power BI


I m trying to use source string from a variable and i m getting an error that i can not convert string to list.

I have the below step as source:

= Table.Combine({#"File 2023", #"File 2024", #"File 2025"})

I create a table and import this the below string as a value

{#"File 2023", #"File 2024", #"File 2025"}

Variable called cnsListcreated and the string succesfully passed into the variable.

When i use = Table.Combine(cnsList) i get the error that i can not use text as list.

Any ideas?


Solution

  • Create a blank query and paste:

    ={#"File 2023", #"File 2024", #"File 2025"}
    

    This will generate a list. Rename the list to FileList. Use as follows:

    = Table.Combine(FileList)