Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello Power BI Community:
When designing my database schema, I would like to name the columns so that Power BI's "autodetect" feature for relationships works perfectly and unambiguously. I could not find many meaningful hints in the documentation so far.
I am glad for any suggestions or information how the algorithm works.
Thanks,
Hal.
@HAL I have dealt with these scenario a lot. In my experience powerbi desktop when loading data will use column names to determine if there is a relationship between two tables. For exampel you have customerID column in one table and customerID in another it will be related. However it will also look at the data so essentially determining PK FK principles.
Through lot of testing I've found a solution that has been working for me so far. Even though if you design your database properly and have all necessary PK FK relations powerbi desktop hasn't always automatically created them all. In my case I had a lot PK FK relations in database that had more than 30 tables. To avoid any manual work and manually creating relationships in powerbi desktop, I have initially used DirectQuery feature to connect to my database (I had sql server db and so DirectQuery is supported). With DirectQuery no data is imported in powerbi desktop and it maintains all PK FK relations you have in your database. Once connected save your pbix file (without doing any further work on visuals).
Next time you open that pbix file you will have button on bottom left hand corner saying DirectQuery enabled click here to change. Using that change it to import. This will load data from your tables into powerbi desktop but will maintain all PK FK relations and so you've avoided any missing out of relations that would had to be done manually.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.