cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chandu_Tevakoni
Helper I
Helper I

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.

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
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Dev Camp Session 26

Check it Out!

Mark your calendars and join us on Thursday, September 29 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors