Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
We have two tables in which technically they are unique values in the database on both ends.
Please notice that one of them have a trailing space.
Power BI does not allow me to create a relationship between the two as it does a trim before.
Is there any way other than deleting a row to create a relationship?
Goal is to keep all rows and consider both rows as unique
table 1:
"AB123 "
"AB123"
table 2
"AB123 "
"AB123"
I find it a bit unbelievable that this has not been fixed by Microsoft as of September 2022...
This is the most redicilous thing i've ever seen in my life. And this is Microsoft not a tiny little software company. The spaces are not recognized in power query but recognized in model and dax side. Is he an engineer or a truck driver who decided to be like that.
Hi @purnima13,
I have e-mailed to Product Team to consult with them about this problem. Will update my reply here once I get any response.
Best regards,
Yuliana Gu
Yes, it's somewhat unexpected that the modeling engine would automatically trim values. However, the trailing spaces are still recognized in the query editor, so I would recommend adding a custom column there and simply concatenating a random character. E.g. "AB123" -> "AB123_" & "AB123 " -> "AB123 _"
@purnima13 Please try creating a unique hexadecimal value in the database (which will be unique for each text with space and without space) and use this as a relationship link between tables.
Proud to be a PBI Community Champion
@PattemManohar Thank you. This is indeed a good idea.
Is there any way for it not to impact perfomance in the relationship?
A hexadecimal would be a text according to power BI and large text field have poor performance.
Hi @purnima13,
I got below response from PG:
When strings are imported into AS Engine, the trailing spaces are trimmed.
It looks like currently we are not able to avoid this behavior. The workaround is to replace the trailing space with other type of character.
Best regards,
Yuliana Gu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |