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
alejandrofm
Helper II
Helper II

Multiple tables from same DB vs Query

Hi, I saw across forums and tutorials several users loading different tables from a database and then creating relations on Power BI to work.

With this you have to use formulas with the "RELATED" operation and have a specific treatment when joining tables.

 

Any advantage in loading simple tables (when the source is a single DB) and creating the realtions Vs loading a query with all the fields you need to work? either via direct query or import.

 

The query approach seems simple when working with the data.

 

Thank you!

1 ACCEPTED SOLUTION

It's actually a pretty common to load multiple tables from the same DB and create the relationships in Power BI data model. If you have a straight-up database, then all of the tables are disconnected technically. You may have keys defined that "tie" the tables together but those relationships really only exist in the SQL statements that either insert, retrieve and delete data from the database.

 

Now, if you have a cube, either MDX or Tabular, then those relationships exist in the cube as actual defined relationships between tables and you could connect Power BI to the cube directly and that's probably a better way to go.

 

When people build relationships in Power BI, they are generally taking the disconnected tables that are imported, either from the same database or multiple data sources and are creating that tabular cube within the Power BI data model.

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

That's a very broad question with no single "one-size-fits-all" answer.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thank you @Greg_Deckler that's true, I was for the broader answer, I think that I could wrote the question better.

But I think I will understand if you could tell me an example (very simple) when load individual tables from same database is better.

 

I'm thinking about it and I don't have ideas of why would yo load individual tables from same database and make the joins in PowerBI.

 

Maybe is better in the case when I have one to many to avoid the "distinct" in every formula/measure?

 

thank you!

It's actually a pretty common to load multiple tables from the same DB and create the relationships in Power BI data model. If you have a straight-up database, then all of the tables are disconnected technically. You may have keys defined that "tie" the tables together but those relationships really only exist in the SQL statements that either insert, retrieve and delete data from the database.

 

Now, if you have a cube, either MDX or Tabular, then those relationships exist in the cube as actual defined relationships between tables and you could connect Power BI to the cube directly and that's probably a better way to go.

 

When people build relationships in Power BI, they are generally taking the disconnected tables that are imported, either from the same database or multiple data sources and are creating that tabular cube within the Power BI data model.

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.