Forum Discussion

AnkitaM's avatar
AnkitaM
Copper Contributor
Oct 13, 2020
Solved

Reference to a Query (connection only) based on a string

Hello everyone,    I am trying to use Power Query in the excel. I have to import a table from any of the 3 different existing data sources which are connection only queries. I am trying to select t...
  • SergeiBaklan's avatar
    Oct 13, 2020

    AnkitaM 

    Function returns some text, perhaps #"Customer Specific WL".  Source also will be exactly the same text value. Assuming that is correct table name, you may use

    Source = Expression.Evaluate(WLTable,#shared),
    ...

    to evaluate it in current environment (#shared) and return table.

     

    More about this function is here Expression.Evaluate() In Power Query/M  That is relatively old blog but still actual.

Resources