Forum Discussion
Leading and Trailing Spaces
My experience is as-per this article
powerbi engine removes trailing spaces but not leading spaces. This is not Power Query (which leaves them in).
This is what i have in the 'transform data' section, as you can see i did not trim anything.
Here is my txt file:
As you can see there are about 16 cases where there are spaces in them, thus the length is >3.
but with this code: "RouteIDError = IF(NOT(LEN('Duplicate'[Route ID]) = 3), "Route ID ", "")", I only get 5 RouteIDError, it does not count the trailing spaces.
How do I have powerbi include the leading and trailing spaces? Please assist.
- PwerQueryKees2 years agoSuper User
That is not your M code. Open the advanced editor, found in the view menu and copy paste.
The problem may be in the change type step. If it changes to numeric, it will definitely remove spaces....
- Anonymous2 years agoNot applicable
This is what i have