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 ...
PwerQueryKees
2 years agoSuper User
Can you share your M code? All steps from loading the file to where your query fails?
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.