Forum Discussion
How to Creata a custom column with IF and LEFT function
Hi all,
tried to create new Custom column like this :
IF([SalesOrderOriginCode] = "PHONE", "PHONE",
IF(Text.Start([InvoiceAddressCity],1)= "A", "LOCAL","EXPORT")
)
No syntax error, but after press ok, it says The name IF wasn't recognized. What's wrong ?
Thanks
VoltesDev you didn't even copy my formula, please read the syntax. IF in lower case. Keep in mind M language is case sensitive, FYI
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
6 Replies
- parry2kSuper User
VoltesDev seems like you are adding this in Powe Query
if [SalesOrderOriginCode] = "PHONE" then "PHONE" else if Text.Start([InvoiceAddressCity],1)= "A" then "LOCAL" else "EXPORT"I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡