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
Anonymous
Not applicable

Relationship Error in PowerBI

I am having a Transacion table Called "OrderEntry" in which the columns are (OrderID, FarmerName, MandalName, VillageName, Amount) and two Master Tables called "Master_Mandal" and "Master_Village"

The Columns in "Master_Mandal" are (DistrictID, MandalID, MandalName) and Columns in "Master_Village" are (MandalID, MandalName, VillageID, VillageName)

I kept the Relationships in PowerBI as 1. Master_Mandal(MandalName) - OrderEntry(MandalName)

2. Master_Village(VillageName) - OrderEntry(VillageName)

 

Now, the Problem is, the second relationship is not taking in PowerBI as it is showing Error like "You can't create a relationship between these two columns because one of the columns must have unique values". If OrderEntry has unique VillageNames as in Master_Village then there will be no error. But  Transaction Table definitely have same VillageNames as it can't be unique. I Created so many similar relationships but never get this kind of error.

 

Even, the first relationship is same as the second relationship and it is working absolutely fine. Can anyone help me why the Second relationship is getting error.

1 ACCEPTED SOLUTION
prihana
Helper V
Helper V

Data is getting duplicated somewhere.

 

First of all i would recommend to use the Mandal ID and Village ID as foreign keys in OrderEntry rather than using the names.

View solution in original post

2 REPLIES 2
prihana
Helper V
Helper V

Data is getting duplicated somewhere.

 

First of all i would recommend to use the Mandal ID and Village ID as foreign keys in OrderEntry rather than using the names.

Anonymous
Not applicable

As per my requirement I can't use MandalID and VillageID in OrderEntry Table.

 

In Master_Village for Different MandalID there will be same VillageNames, and it is unique because of that different MandalID. Hence there is no duplicate data in Master_Village and in OrderEntry there will be same VillageName because it is transaction table.

 

Now, Please suggest me if there is any other alternative to solve this error.

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.