Forum Discussion

phcampbell01's avatar
phcampbell01
Frequent Visitor
4 years ago

Dynamics Combining of Tables

Hi All,

 

Building dataflows and want to be make the model as re-usable as possibe. I am trying to, if possible, build a merge table from a list of other tables but do dynamically.

 

So in the data model i have 2 tables:

- PracticeName1_Clients

- PracticeName2_Clients

 

The situation is that overtime we could be dealing with Practice 3, 4 and so on.

 

What i was thinking is that i have a table of the Practice names (PracticeName1, PracticeName2, etcc)

 

then using this list reference Table.Combine such that it will combine the tables based on the list.

 

the fixed method is Source = Table.Combine({PracticeName1_Clients, PracticeName2_CLients), want turn this into a refernce to the list but not sure if possible or the syntax.

 

We will have numerous tables (e.g PracticeName1_Revenue) so a lot of configuration when we do for other clients (with same data model)

 

Hope that make sense!

 

Thanks

Paul

5 Replies

    • phcampbell01's avatar
      phcampbell01
      Frequent Visitor

      Thanks for that, much appreciate the assistance. have just tried it but getting an error...see image below.

       

       

       

      not sure if relevant but i am in power bi online dataflows not desktop 

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Icon for Administrator rankAdministrator

      Thanks for that, much appreciate the assistance. have just tried it but getting an error...see image below.

       

       

      phcampbell01_1-1633987417683.png

       

      not sure if relevant but i am in power bi online dataflows not desktop 

  • v-jingzhang's avatar
    v-jingzhang
    Icon for Community Support rankCommunity Support

    Hi phcampbell01 

     

    It seems Power Query in dataflow doesn't support keywords that well like in desktop. You could refer to this blog: Get List of Queries in Power BI - RADACAD. In comment area, Reza Rad says that "This method only works inside the Power Query Editor. the environments of #shared and #sections are not available when you load data into Power BI." Based on my test, I can combine queries well in Power BI Desktop while only get null for each table in dataflow. 

     

    Best Regards,
    Community Support Team _ Jing

    • phcampbell01's avatar
      phcampbell01
      Frequent Visitor

      Thanks for that, thats what i had determined as well.

       

      I looked at the article you mentioned and noted Reza says "Unfortunately, there is no way to append query names like that when you load data into Power BI unless you statically have their names somewhere."

       

      To his last point i could have a static list of the tables ( {"ClientsTable1","ClientsTable2",ClientsTable3"). On this basis could i form a statement to combine the related tables?

       

      Regards