Forum Discussion
Relation active but not working
- 8 years ago
Hi fcarro
The Hypermarket[Assortment Code] column seems to have an extra space at the end of the code. Relationships need an exact match to work. I added a calculated column using LEN('Hypermarket'[Assortment code]) and it was returning a value of 4 (the other tables were returning 3.
I created a new calculated column in the Hypermarket table to test as follows
When I changed the relationship to use this new column, it worked.
I recommend you fix the problem in the query editor. Highlight the column in question and use the "Clean" and "Trim" options to tidy up. Probably best to do this on both tables.
Hi fcarro
The Hypermarket[Assortment Code] column seems to have an extra space at the end of the code. Relationships need an exact match to work. I added a calculated column using LEN('Hypermarket'[Assortment code]) and it was returning a value of 4 (the other tables were returning 3.
I created a new calculated column in the Hypermarket table to test as follows
When I changed the relationship to use this new column, it worked.
I recommend you fix the problem in the query editor. Highlight the column in question and use the "Clean" and "Trim" options to tidy up. Probably best to do this on both tables.
Thank you but I just found the solution 10 minutes ago !
While double checking again my data I've seen this extra space that was hiding...
Thanks for the formula, next time I'll start by trimming my values.