Forum Discussion
Anonymous
2 years agoNot applicable
Leading and Trailing Spaces
Hi, I feel like Power BI is automatically trimming my data. Is there a way to not have that happen? I am importing txt files with | as the delimeter. Lets say "21B", "21B " and " 21B" are the data ...
Anonymous
2 years agoNot applicable
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.
PwerQueryKees
2 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