Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.