Forum Discussion
Auto-detect cardinality one to one relationships from SQL Server DirectQuery tables?
Anonymous , You can join Customer with food orders and drink order and analyze data together.
Also, assume you take a not summarized column food orders and customer Id from the customer, You can take any aggregated from drink orders
- Anonymous5 years agoNot applicable
amitchandak, When I have a table with fields from Customers and FoodOrders, Power BI gives me this error if I add fields from DrinkOrders.
Can't determine relationships between the fields
Can't display the data because Power BI can't determine relationship between two or more fields.
amitchandak wrote:Anonymous, You can join Customer with food orders and drink order and analyze data together.
Also, assume you take a not summarized column food orders and customer Id from the customer, You can take any aggregated from drink orders
- PaulDBrown5 years ago
Community Champion
Anonymous
In your visuals, you should be using the fields from the Customer table, and then add whatever fields/measures from the other tables.
If you do not use the field from the Customer Table to "bridge" the other 2, you will get the error.
If you have any other fields common to both FoodOrders and DrinkOrders (for example a date field, postal code etc... you should create dimension tables for these too, and link them in a one-to-many relationship with both fact tables using the common fields.- Anonymous5 years agoNot applicable
I get the error if Customers are one-to-many with FoodOrders and DrinkOrders.
I do not get the error if Customers are one-to-one with FoodOrders and DrinkOrders.
If I have a 100 Order tables, I do not want to manually switch relationships from one-to-many to one-to-one.
Power BI auto-detects one-to-many, but I cannot get it to auto-detect one-to-one relationships from SQL Server databases.
What are a dimension tables?
PaulDBrown wrote:Anonymous
In your visuals, you should be using the fields from the Customer table, and then add whatever fields/measures from the other tables.
If you do not use the field from the Customer Table to "bridge" the other 2, you will get the error.
If you have any other fields common to both FoodOrders and DrinkOrders (for example a date field, postal code etc... you should create dimension tables for these too, and link them in a one-to-many relationship with both fact tables using the common fields.