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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
syncwithconnex
Frequent Visitor

One to one the cardinality you selected isn't valid for this relationship

Hi,

 

I have a one to one relationship between two tables. One is called DesktopLicenseKey and the other is called QBPOSUsersWithSKU. Here are the fields:

 

LicenseKey

ID

UserName

 

UsersWithSKU

UserName

 

The UsersWithSKU table user name field is unique. The LicenseKey field user mail ID is unique. There are rows in UsersWithSKU that are missing from LicenseKey. How do I handle these errors?

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @syncwithconnex ,

If the [UserName] really has duplicate values, we can't set the relationship as 1-1, this could be the reason why the error throws out.

You can create measures like this to check whether the values are the same in the card visual for each table:

Countrows= COUNTROWS('LicenseKey')
Distinctcount = DISTINCTCOUNT('LicenseKey'[UserName])

 

You can also refer these simliar issues:

  1. The cardinality you selected isn't valid for this relationship 
  2. Can't Select 1:1 Relationship - No Duplicates in Data 
  3. Cardinality you selected isn't valid 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yingjl
Community Support
Community Support

Hi @syncwithconnex ,

If the [UserName] really has duplicate values, we can't set the relationship as 1-1, this could be the reason why the error throws out.

You can create measures like this to check whether the values are the same in the card visual for each table:

Countrows= COUNTROWS('LicenseKey')
Distinctcount = DISTINCTCOUNT('LicenseKey'[UserName])

 

You can also refer these simliar issues:

  1. The cardinality you selected isn't valid for this relationship 
  2. Can't Select 1:1 Relationship - No Duplicates in Data 
  3. Cardinality you selected isn't valid 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

syncwithconnex
Frequent Visitor

If the tables should have a one to one relationship, then why does Power BI fail to allow me to choose one to one? The error is the cardinality you selected isn't valid for this relationship.

I had the same problem and the error was due because one of the columns was set as text while the other was as integer.

@syncwithconnex 

 

Have you checked that there are no duplicate values or the are no multiple cells with NULL or they are empty??

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors