[Fixed!] Excel Data Model Relationships Not Working (6 Solutions)

When you import several tables, Excel helps detect and define relationships among those tables so that you don’t need to create those relationships manually. But sometimes, you find that the data model relationships are not working in Excel. It can cause by several reasons. This article will show you the proper solutions for data model relationships not working in Excel. I think you find this article informative and can be helpful for future purposes.


Overview of Data Model Relationships

Data model relationships can be defined as a relationship that connects two different data tables. Creating relationships among tables can add more power to your data analysis. By creating a structure like this, you can track all the data in a single table. Relationships can exist in the data model which you can create manually or Excel can detect them when you import several tables. You can also use the Power Pivot add-ins to create the data model relationships. In a data model, you can find two different types of relationships: one-to-one and one-to-many.

A one-to-one relationship is known as a relationship of one with a certain one. For example, customer and customer discounts can be a one-to-one relationship. Because a certain customer can get a certain discount.

A one-to-many relationship is known as a relationship between one with several others. For example, customers and orders can be one too many relationships. Because one customer can put several orders at a time.

A Many-to-many relationship can’t be supported in the data model. Suppose, you can think of customer and product Where a customer buys several products, and a similar product could buy many customers. This type of relationship can’t be supported in the data model.

A Data model may have several types of relationships between two tables. To create a relationship in Excel, Excel must have a solo way from one table to another. Here, you can see that only a single relationship can operate at a time. You can choose the inactive relationship.


6 Possible Solutions If Data Model Relationships Are Not Working in Excel

To solve the Excel data model relationships not working problem, we have found six different solutions through which you can get the preferred result. All of these solutions are effective for several purposes. You can try all of these and get your preferred one. As we know that the data model relationship can be done in two different ways: one is manually and the other is using Excel. There are some specific problems that can arise while creating the data relationships.


Solution 1: Manually Create Relationships Between Tables

When you drag fields into the Values area in the existing Pivot Table, you will get the notification that indicates the relationship is needed. The relationship basically depends on the foreign key with a similar name to the primary key column. If the name is not enough, you need to create a manual relationship between tables. More importantly, the primary key is known as a unique key that identifies a row in a given table whereas the foreign key is known as a key that indicates a column refers to a unique column in another table. So, basically, you need to check if there is a foreign key name similar to the primary key column. Otherwise, you will get a message of no relationship detected. In that case, you have to create relationships between tables manually.

Read More: How to Create a Data Model in Excel (3 Handy Ways)


Solution 2: Modify Unsupported Data Type

Another time, you can get a message of no relationship detected or a data model relationship not working when the data type is not applicable. If any of the tables used in the Pivot Table have different data types, no relationship will be created. In that certain case, you need to create the manual relationship dialog box where you can create relationships between the active tables in the Pivot Table or, you need to change the data type and make covert every table in a certain data type which will help to create a good relationship.

Read More: Remove Data Model from Pivot Table in Excel (with Easy Steps)


Solution 3: Make Sure There Is a Valid Relationship Between Tables

Sometimes you add tables in the Pivot Table that have no logical relationships between them. Suppose, you insert two tables where they have partial relationships but there are no valid relationships between those tables. In that case, Excel automatic detection can’t give you any valid result. So, the automatic detection is also invalid in that case. So, you need to insert that certain tables which have some logical relationships between them. Otherwise, you will see that the data model relationship not working status. In this process, you can still conclude the results from the Pivot Table that the fields don’t provide a meaningful conclusion.

Read More: How to Manage Data Model in Excel (with Easy Steps)


Solution 4: Create Bridge Table

Another way you can solve your data model relationships not working problems is by using a bridge table. The bridge table is used to create a bridge between the ‘not working’ table and the table you want to use. It can be defined as the table that reduces the gap between the fact table and the not working table at a lower grain. Suppose, you have two entities: Customer and Product.

A relationship needs to be created by connecting these two. While mapping you need to put the customer and product on their own table. As the relationship is a many-to-many relationship, so, you can’t represent it by the foreign key of these two tables. So, it must represent by its own table. In that case, the bridge table will come into consideration. The bridge table has its own primary key which represents the combination of the primary key of both tables that connects each other. That means the primary key of the product table is ProductID and the primary key of the Customer table is CustomerID. So, the primary key to the bridge table will be the combination of ProductID and CustomerID.


Solution 5: Add Fields into Value Area in Pivot Table

Automatic relationship detection can be applicable for measures only. It is not applicable for calculated fields that you use in the row and column labels in the Pivot Table. So, when you build the required Pivot Table by inserting several tables, you can add some unrelated tables. But to get the relationship using the automatic relationships detector, you have to put a field into the Value area. Otherwise, you will see the Excel data model relationships not working status.

Excel Data Model Relationships Not Working

Read More: How to Create Calculated Field in Pivot Table Data Model


Solution 6: Detect Wrong Relationships Through Automatic Detection

When the relationships are created by automatic detection, the detection algorithm will create all the possible relationships based on the values of the tables and rank the relationships based on their probabilities. Then, Excel will create the most likely relationship with the help of the detection algorithm. If the tables contain several columns that can be used as keys. In that case, some of the relationships rank lower compared to others, and in most cases, they create the wrong relationship. So, if the automatic detection provides you wrong relationship which can’t help your needs then delete those relationships and create them manually.


Conclusion

We have shown six effective solutions to solve the Excel data model relationships not working problem. All of these solutions are fairly effective and easy to utilize. While creating the data model relationship, you may face some tricky problems because of which you can’t get the preferred relationships. This article has covered all possible areas of this topic. If you have any more questions, feel free to ask in the comment box. Don’t forget to visit our Exceldemy page.


Related Articles

Durjoy Paul

Durjoy Paul

Hi there! I'm Durjoy. I have completed my graduation from the Bangladesh University of Engineering and Technology. I am working and doing research on Microsoft Excel and here I will be posting articles related to it.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo