Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.