cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GstrandAK
New Member

M Syntax for Importing multiple tables from single DB

Our org. requested that we limit the use of our data models for performance/resource management. I can create one Power BI data model through the desktop, and use separate SQL queries to import the tables.  The tables are unrelated, so append/merge not an option.  However, I fear that each SQL call to the same DB might be the same as having multiple data models with the single table query? 

 

I am a novice Power BI user and have never written M statements.   Is there a way to write a M query that could import all the tables?  Ideally, the Power BI table names would be the same as the SQL DB names.  

1 ACCEPTED SOLUTION
edhans
Super User
Super User

You won't really be saving much. You'd just have a TON of calls in one model vs a few calls in many models.

 

There are ways to optimize by publishing certified data sets, or using Data Flows to sync and then using those as the basis for your Power BI models. The latter might be the best, but you'd need someone to set up the right type of data flows to ensure all relevant data is published for use. Then you could have those refresh 2-3 times a day, or less if not needed more often. Then it wouldn't matter if a thousand Power BI models hit the Data Flows 7-8 times a day. Your internal server wouldn't be impacted by that.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User
Super User

You won't really be saving much. You'd just have a TON of calls in one model vs a few calls in many models.

 

There are ways to optimize by publishing certified data sets, or using Data Flows to sync and then using those as the basis for your Power BI models. The latter might be the best, but you'd need someone to set up the right type of data flows to ensure all relevant data is published for use. Then you could have those refresh 2-3 times a day, or less if not needed more often. Then it wouldn't matter if a thousand Power BI models hit the Data Flows 7-8 times a day. Your internal server wouldn't be impacted by that.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Kudoed Authors