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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Bug: Key columns with a value "#" cause table relation issues

When a  column being used as a relationship key contains the value "#", Power BI is unable to grant a One to Many or One to One relationship. Instead, the Create Relationship dialog box reads "The cardinality you selected isn't valid fo this relationship".

 

Specific context

 

When using the SAP Business Warehouse connector, two tables were imported. One, labeled Maintenance Items is the Fact table with various keys. The other, labeled ABC Indicator, is a lookup table with 4 rows.

 

Lookup tableLookup table

 

The key for the last row is '#', something the SAP system uses instead of a blank value across all tables. Nonetheless, all keys are unique for the "One" part of the relationship.

 

Attempting to enforce a relationship after removing blanks/errors from both tables yields the following error:

error screenerror screen

 

By replacing both key columns ([Maintenance Items].[ABC Indicator Key] and [ABC Indicator].[Key]) '#' values with 'NA', we are now able to create a One to Many Relationship:

 

Successful Relationship.png

 

This bug can be frustrating for users who don't dig and run into a similar scenario. 

Status: New
Comments
v-chuncz-msft
Community Support

@jribs 

 

I tried the latest version and cannot reproduce the issue. You may try different Data Connectivity mode.