Forum Discussion
Problems with non printables characters
- 4 years ago
I reproduced your problem from the link which you have mentioned. As you just need to extract digits and ignore any other characters (in this case non-printable ones), just use following formula on the problematic columns
=Text.Select([Column],{"0".."9"})
For example, I split one of your date columns and used following formula for the year
=Text.Select([Data da Divulgação.3],{"0".."9"})
Edit - After analyzing your data, I took one sample date - I found, it has following characters
U+200B
space i.e. character 160
then date
then once again U+200B
Now Clean command of PQ will not clean any of these as it cleans only Control characters and none of above are control characters.
Rather than cleaning i.e. removing, we will need to do reverse approach - Pick up only what is needed. You need only digits 0 to 9 and /.
Hence, for your all date columns, you simply use following to pick up only date part and ignore all non-printable hidden characters
=Text.Select([Column],{"0".."9", "/"})
Hence, you can convert your all date columns to true date format from following formula
=Date.From(Text.Select([Column],{"0".."9", "/"}))
Edit 2 - This single formula can be used to convert your date columns into right date columns
Date.From(Text.Trim(Text.Replace(Text.Clean([Column]),Character.FromNumber(8203),"")))
Here Text.Clean will remove non printable control characters.
8203 is Unicode for U+200B and leading/trailing blanks will be removed by Text.Trim
Hi fabiojoa ,
Select the column that you want to remove non-printable characters from.
Go to Transform tab > Format (dropdown) > Clean.
Pete
- fabiojoa4 years agoHelper I
Not working, Pete!
- Anonymous4 years agoNot applicable
could you share some part of your table (non in a some image format)?