Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Does this functionality work? I have tried using Select Related Tables when getting data from SQL Server and OLE DB, but each time I select this option, it says:
We didn't find any more related tables.
Am I doing something wrong?
Solved! Go to Solution.
Yes, you have to create the relationships in the Power BI model even if corresponding relationships already exist in the source database. Power BI can automatically create relationships when you load two tables with matching key columns in a 1:M pattern, but I don't like to rely on that. Just manually set them up in the relationship manager.
Proud to be a Super User!
Hi @ironryan77,
The “Select Related Tables” option is useful when users want to import multiple tables when connecting to a database. Without this option, users have to manually select all tables that they wanted to import, which often required an understanding of the underlying database schema so they would pick all tables that are related.
With this option, Power BI Desktop will automatically select all tables that have a direct relationship to one or more of the already selected tables.
Reference:
https://powerbi.microsoft.com/fr-fr/blog/44-new-features-in-the-power-bi-desktop-september-update/
Thanks,
Lydia Zhang
Thank you, I understand this. But how exactly does Power BI identify Related Tables since in my attempt so far it has not recognized any related tables, regardless of which I base table I choose? I looked at your included URL and there is no details for how Power BI chooses these tables.
Hi @ironryan77,
As stated in that blog, Power BI Desktop will automatically select all tables that have a direct relationship to one or more of the already selected tables.
In your scenario, tables should have been established relationships in the SQL Server database or Oracle database before you import data from them to Power BI, this way, once you select one table and then click "Select Related tables" option, Power BI Desktop will select all tables that have a direct relationship to the selected table.
Thanks,
Lydia Zhang
That's the part I'm not sure I understand. Initially I thought that any tables which are sourced into stored procs on the same server, would become related. But are you saying that you have to manually create table relationships from the Database Diagrams folder? Is this the only way to create relationships?
Yes, you have to create the relationships in the Power BI model even if corresponding relationships already exist in the source database. Power BI can automatically create relationships when you load two tables with matching key columns in a 1:M pattern, but I don't like to rely on that. Just manually set them up in the relationship manager.
Proud to be a Super User!
I dont understand how this feature is supposed to work. Let say I am starting a new BI project, I have all my data in SQL Server, with all the tables nicely organized with PK and FK.
If I select my fact table and click on the select related tables button, it does not find any. The answer above says that the relationship must already exist in PowerBI, but I am starting my project, getting the data is the first think I am suppoesd to do. Am I missing something?
Yes RelatedTable function works for me.
Obivously, you need a relationship between your 2 tables.
RelatedTable goes from the One side to the Many side.
What is not working for you ?
Oh, so it sounds like I need to define relationships before I can select related tables? I don't have any relationships defined in Power BI yet for these tables. But many other tables are sourced from this one SQL table that I chose "Select Related Tables" on. If I need to define relationships first, then what is the benefit of this feature?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
99 | |
68 | |
46 | |
39 | |
33 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |