Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have two lists of names that I want to merge. One list used their names with accents (like é) and the other doesn't. Since having the proper names with the accents isn't super important, I decided to replace all of the accented characters to non accented ones so the merge will work (for example every é to a plain e).
Is there a quicker way to do this than doing a replace value for every single instance? Because there's about 12,000 rows.
Thanks!
Solved! Go to Solution.
Hey Sean,
probably it is more complicated and I just don't get it because of languages reasons: I would just use the "Replace Values..." in the power bi "edit queries mode". Just right click on "René" > Replace Values. You can even choose columns and just replace é to e.
BR
Hi,
If you want to replace letters with accented versions in a word or sentence, you can use a word processor or text editor that supports special characters. In most word processors, you can insert accented characters by holding down the "Alt" key and typing a specific code on the numeric keypad. For example, to insert an é, you can hold down the "Alt" key and type "0233" on the numeric keypad.
Another option is to use a tool that provides a virtual keyboard with accented characters. You can use your mouse to click on the desired accented character, and it will be inserted into your document.
If you want to programmatically replace letters with accented versions in a string, you can use a library or a function that supports character encoding and mapping. For example, in Python, you can use the "unicodedata" library to map characters to their accented versions using the "normalize" and "translate" functions.
Please try this: https://stackoverflow.com/q/71969831/6165594
= (textToConvert) =>
let
textBinary = Text.ToBinary (textToConvert, 1251 ),
textASCII = Text.FromBinary(textBinary , TextEncoding.Ascii)
in
textASCII
Hello Denis,
I was hoping you'd be able to help me
Is there a different version of encoding I can use to help me convert the below:
From: Rvt Tekstil Konfeksiyon Sanayi Ve Dış Ticaret Ltd Şti
To: Rvt Tekstil Konfeksiyon Sanayi Ve Dış Ticaret Ltd Şti
The target language is Turkish
Any help you can offer would be greatly appreciated
Thank you,
Daniel
Hello,
You can create a function in powerquery that converts all column.
Open a blank query e paste this:
(Texto as text) =>
let
ListAccents =
{
{"à","a"},
{"á","a"},
{"â","a"},
{"ã","a"},
{"ä","a"},
{"è","e"},
{"é","e"},
{"ê","e"},
{"ë","e"},
{"ì","i"},
{"í","i"},
{"î","i"},
{"ï","i"},
{"ò","o"},
{"ó","o"},
{"ô","o"},
{"õ","o"},
{"ö","o"},
{"ù","u"},
{"ú","u"},
{"û","u"},
{"ü","u"},
{"À","A"},
{"Á","A"},
{"Â","A"},
{"Ã","A"},
{"Ä","A"},
{"È","E"},
{"É","E"},
{"Ê","E"},
{"Ë","E"},
{"Ì","I"},
{"Í","I"},
{"Î","I"},
{"Ò","O"},
{"Ó","O"},
{"Ô","O"},
{"Õ","O"},
{"Ö","O"},
{"Ù","U"},
{"Ú","U"},
{"Û","U"},
{"Ü","U"},
{"ç","c"},
{"Ç","C"},
{"ñ","n"},
{"Ñ","N"}
}
in
Text.Combine(List.ReplaceMatchingItems(Text.ToList(Texto), ListAccents))
or this:
https://docs.microsoft.com/en-us/powerquery-m/text-replace
you can use:
New column = Text.Replace([column name] , "á", "a")
Hey Sean,
probably it is more complicated and I just don't get it because of languages reasons: I would just use the "Replace Values..." in the power bi "edit queries mode". Just right click on "René" > Replace Values. You can even choose columns and just replace é to e.
BR
Ah thanks! For some reason I thought that replace value only worked if you were replacing the whole value.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
105 | |
99 | |
98 | |
38 | |
37 |
User | Count |
---|---|
154 | |
120 | |
73 | |
73 | |
63 |