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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors