Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
i have some csv-data:
number;title 1;ich bin text nur mit buchstaben und 123456 2;ich bin auch ein text aber mit vielen Sonderzeichen $ / & welche alle gelöscht werden sollen zahlen ( 123454) sollen aber erhalten bleiben 3;ich bin ein Dollarzeichen ($) und soll weg 4;Ich bin 123“ gross und wiege 54,5 kg 5;mein name ist „Hase“ ich weiss nichts
how can i only except a-zA-Z0-9-_, characters?
the result should be:
number;title 1;ich bin text nur mit buchstaben und 123456 2;ich bin auch ein text aber mit vielen Sonderzeichen welche alle gelöscht werden sollen zahlen 123454 sollen aber erhalten bleiben 3;ich bin ein Dollarzeichen und soll weg 4;Ich bin 123 gross und wiege 54,5 kg 5;mein name ist Hase ich weiss nichts
Solved! Go to Solution.
My bad. I think i gave a unneccessary lengthy code
Try this one
=let Characterstokeep={"0".."9","a".."z","A".."Z","_","-"," "}
in
Text.Select([title],Characterstokeep)
Give this a shot as Custom Column
=let Characterstoremove=List.RemoveItems(
List.Transform({1..126}, each Character.FromNumber(_)),{"0".."9","a".."z","A".."Z","_","-"," "})
in
Text.Remove([title],Characterstoremove)
okay - this works but i see i have also those charaters in the string:
•
l
★
✔
Ø
My bad. I think i gave a unneccessary lengthy code
Try this one
=let Characterstokeep={"0".."9","a".."z","A".."Z","_","-"," "}
in
Text.Select([title],Characterstokeep)
Hey - yes! thx
you also have a idea to let the german umlauts pass?
like
ä ö ü Ä Ö Ü ß
zorry my mistake of course:
let Characterstokeep={"0".."9","a".."z","A".."Z","_","-"," ","ä","ü","ö","ß","Ä","Ü","Ö"}
in
Text.Select([Title],Characterstokeep)but now i have a little not funny side effect:
from:
Buschbeck Grillkamin Carmen mit Tisch, grau/terra, 65 x 180 x 203 cm
to:
Buschbeck Grillkamin Carmen mit Tisch grauterra 65 x 180 x 203 cm
is there a way to do this:
Buschbeck Grillkamin Carmen mit Tisch - grau - terra - 65 x 180 x 203 cm
so i mean:
- if there is a character which would be cut is there a possibility to separate them with a
-
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 32 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 25 |