Forum Discussion
kitcatnj
3 years agoFrequent Visitor
New Column With Nested IFs
I am analyzing a column and based on what's in there, adding a new column. There are 3 things to check for. Does the column contain "??", NULL, and anything not = to 2 char in length This part ...
- 3 years ago
Hi,
I (think you missed the M function you need 😉
LEN doesn't exist in M , but Text.Length does 🙂
more info : https://learn.microsoft.com/en-us/powerquery-m/text-length
Hope it helps
kitcatnj
3 years agoFrequent Visitor
THANK YOU !!!! That was it! This now works.
= Table.AddColumn(TABLENAME "siteRefGB", each if Text.Contains([siteref], "??") then "BAD" else if [siteref] = null then "BAD" else if Text.Length([siteref]) <> 2 then "BAD" else "GOOD")