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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. 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
Community Champion
Community Champion

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
Community Champion
Community Champion

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors