Forum Discussion
han_rj
1 year agoHelper IV
Issue Treating nulls in Conditional Column of Type Any
Hi All, I have a column Name of which I am extracting only rows that contain words like "Additive" using conditional column , I have attached the M-Query code for the same. The issue I am facing ...
- 1 year ago
if Text.Contains(Text.From([Name]??""),"Additive") then [Name] else null
Akash_Varuna
1 year agoSuper User
Hi han_rj , I think Text.Contains function expects a non-null value, and when it encounters a null , it throws an error Could You please try this
Table.AddColumn(
#"Changed Type",
"Custom",
each if [Names] <> null and Text.Contains([Names], "Additive") then [Names] else null
)
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance