Forum Discussion
Change encoding of a specific column
- 5 years agoThe only advice I would give is to rename the original column BEFORE you add the column. Then you can save the step of renaming the new column because you can use the correct name when you create the custom column.
More steps doesn't necessarily mean slower refresh, depends what you're doing in each step.
If you have lots of steps where you change the data type for example, and change from number to currency then back to number, that should be cleaned up.
Hope that makes sense?
Create a custom column in Power query, in your dataset find the special characters you need to replace, according to your post it must be in spanish so there's only 12 special characters 6 for each case
Use this formula for the custom column
=Text.Replace(Text.Replace(Text.Replace(Text.Replace(Text.Replace(Text.Replace(
Text.Replace(Text.Replace(Text.Replace(Text.Replace(Text.Replace(Text.Replace([your_column],
"á", "á"), "Ã", "Á"),
"ã‰", "é"), "É", "É"),
"Ã", "í"), "Ã", "Í"),
"ã“", "ó"), "Ó", "Ó"),
"ú", "ú"), "Ú", "Ú"),
"ñ", "ñ"), "Ñ", "Ñ")
Remember, this special characters i show here could not be the same as yours, i'm only sure about the é and ó.
replace the special characters for the ones in your dataset and that should do the trick, ovbiously the easiest way to do this is to encode the dataset as utf8 friendly and then it should recognize all those special characters.