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
JENS
Frequent Visitor

Regarding relation between 2 table , must have unique values

Im new at this, and have tryed to read the other solutions regarding the same queastion.

error : You Can´t create a relationship between these two columns because one of the columns must have unique values

 

The left table  is where we have the absence on employees ( one person have 17 days, and the emplid is there 17 times)

The right table is where we have the employee stamdata (name, adress and so on) end the emplid is there only once.

 

In SQL server 2008 r2, there is no issue to relate these fields. what is the best way to set this up. 

ss power bi_.png

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @JENS

 

I assume you tried to establish a relationship between both emplid columns.

If [EMPLID] in EMPLTABLE is unique & there are no nulls in EMPLTABLE[EMPLID], it should work.

 

 

 

View solution in original post

Why not make a unique employee table if none of the two are.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @JENS

 

I assume you tried to establish a relationship between both emplid columns.

If [EMPLID] in EMPLTABLE is unique & there are no nulls in EMPLTABLE[EMPLID], it should work.

 

 

 

I have made sure that there isent any null, and empltable.emplid has 9307 pcs. of unique numbers 100001,100002 and so on.

it still dont work

@JENS

 

As you said the right table is the dimension table which contains unique empid values. Please delete the data source and re-import the table into Power BI Desktop to see if it still works.

 

If the issue still persists, please create a support ticket.

 

Regards,

Why not make a unique employee table if none of the two are.

that might work, but im unsure how to make it.

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.