Why you got The Cardinality you selected isn't valid for this relationship?
In Power BI, you got this error "The Cardinality you selected isn't valid for this relationship" when trying to create a relationship between two tables in Power BI because one of the tables doesn't have unique values, so in this case, you can create a One-Many
or Many-One
relationship and you just able to create a Many-Many
relationship.
Note: you can't use the RELATED
function between two tables doesn't have relationships. Otherwise, you should use LOOKUPVALUE
!
For more details, Please check Power BI: RELATED Vs LOOKUPVALUE DAX
How to solve The Cardinality you selected isn't valid for this relationship in Power BI?
To can create One-Many
or Many-One
relationship between two tables, one of them doesn't have a unique value you have to do the following:
- Reference one of your tables and consider it as a Junction Table between the other two tables.
- Use Power Query Editor to
- Remove the duplications using
Remove duplicates
- Replace blank, null, and errors values using
replace values
or filter
functionalities.
- Create a new relationship as
One-Many
between the newly created table and the other tables.
- Try to use the RELATED function that should be working properly now.
See also, what's the difference between Reference vs Duplicate in Power BI