Showing results for 
Search instead for 
Did you mean: 
Ross_PBI Frequent Visitor
Frequent Visitor

Re: The cardinality you selected isn't valid for this relationship

I had a similar issue due to the output csv file from a source system having an additional blank row of null values after the data

Filtering this out at the query stage fixed the issue for me

I could have deleted the row but the outputs were refreshed automatically from the source system on a certain date



Re: The cardinality you selected isn't valid for this relationship


I faced the same issue, I was sure, that I have all values unique, I checked it with the conditional formatting in excel, then I included Remove duplicates in the Power Query Editor, I also created the Group By column in Power Query Editor to display count of values - each row contained 1.

Finally I created the Card visual based on the measures TotalRows and DistinctRows - what a surprise - TotalRows<>DistinctRows!

How to find the duplicate values -> delete rows by rows in Excel and check the cards. After 10 minutes I found the problem - the space character after the string value


space after string.png


It makes of course unique value for conditional formatting, unique value for Power Query Editor, but not for the Edit relationship dialog!

After deleting this space character, the duplicate value appeared everywhere, so by deleting the duplicate row I could create the 1 to many relationship ...

marks789 Visitor

Re: The cardinality you selected isn't valid for this relationship

Nice job- this solution saved me a lot of time!

Helpful resources

Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 295 members 3,472 guests
Please welcome our newest community members: