Reputation: 411
I have 40 tables. One table has 20 rows, and one of the columns have 1385 distinct values. I would like to use this in a relationship with another table.
TableName(1385 rows) Column:Name:(1385 distinct values)
But when I try to do this in Powerbi/Manage-Relations, it will only accept the option "Many-to-Many" relationship. It reports that none of the column are "Unique".
Well, the data in the column is unique. So how can I configure this column to be unique so I can use it in a "One-to-Many" relationship"?
Do I have to edit the DAX expression and put the "DISTINCT" keyword in the expression for that column? And How?
Now I have:
}, {"Columnname", Int64.Type}, {
Upvotes: 0
Views: 7536
Reputation:
what you can try is to perform remove duplicates in that table(i know its already contains distinct values but you can give it a try)... and/or just load the data again.
Upvotes: 2
Reputation: 3389
Best way would be when you group your data in the query editor. This way your table has only distinct values and you can create your relationship.
In the query designer under Home > Group By
you can group after your column.
Example
Table:
Table (2):
Relationship (One to Many):
Result:
I hope this helps.
Upvotes: 1