Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I want to check whether my list (column 1-3) contains the specified special characters (List). I added custom column with the M code below, somehow it returns False but you can clearly see there is special characters in the strings.
Thanks for help.
Table
Column1Column2Column3Custom
I have an apple | the apple is green | I love apple | FALSE |
duwh | bgi* | ubnh() | FALSE |
uhr??ih | HUij/ji | UHub\ | FALSE |
qw|wqe | qe< | >wd\ | FALSE |
qwed | EWDFqr | ARFt | FALSE |
ASCII_List
List
" |
\ |
/ |
: |
? |
| |
* |
M Code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("PY1BCsIwEEWvMmSlUrDgAYqgpd0KxUWSRWKGJqXEJjbNxsM7reJqHu99GM5ZC1YtCMqDmqYRWcFmi18G94I+InqSLYzP5eeZLDgzKVvyuncHOkl7u9tvIdlYVW5tTeeG4+CIuiZpIbYc8juH9U1Akcry9CDcALP5T9CQvd4vdYgE51s9Myk/", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each List.ContainsAny({[Column1],[Column1],[Column1]},{ASCII_List[List]}))
in
#"Added Custom"
Solved! Go to Solution.
Hi @Irisohyama6 ,
Please add a column by using:
[
comb=[Column1]&[Column2]&[Column3],
f=List.ContainsAny(Text.ToList(comb) ,ASCII_List)
][f]
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Irisohyama6 ,
Please add a column by using:
[
comb=[Column1]&[Column2]&[Column3],
f=List.ContainsAny(Text.ToList(comb) ,ASCII_List)
][f]
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
is this what you want?
Hi @Irisohyama6 ,
Working on this, and thank you for the M code...I did notice Column1 is the only value.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Hi @Irisohyama6 ,
Sorry, am stumped. Think it will be changing the column to a list. However let us call on the m code gurus @ImkeF and @KenPuls
Good Luck!
Nathaniel
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.