Forum Discussion
Leading and Trailing Spaces
"I feel like Power BI is automatically trimming my data" - Where are you seeing that happening? Can you show us please?
- Anonymous2 years agoNot applicable
So I have this "RouteIDError = IF(NOT(LEN('Duplicate'[Route ID]) = 3), "Route ID ", "")", which checks that Route ID (text format), and if it is not a len of 3, it would return "Route ID ", otherwise blank. But it does not count leading and trailing spaces. Such that " 21B" and "21B ", should be counted as a len of 4 including the space but it does not. But if there is a space in between the text, like "21 B" or "2 1B", it would count it as len of 4. So it does automatically trims it and ignores the leading and trailing spaces. So I'd assume it's an issue with the data source settings, but I can't find any option that deals with this.