Forum Discussion
Rafi35
2 years agoNew Member
Text.Contains M Language
Hi Everyone, i have a basic question regarding m language. What will be best way to practice it? And i have a column where in few cells "Aop" is mentioned in remarks and others are not. I want to add a new column and add this word Aop if that is in earlier column or else null. How to do that?
Hi Rafi35
Best way to practice:- Use the power query editor: Spend time in power query editor. Practice creating query using interface, review query using advance editor.
- Learn by doing: Try to solve real world problem. Try to solve them using M language. Hands-on approach will help you understand how different function works together.
- Review and Refactor: Look back at your previous work and see if you can improve it.
- Read Books: My suggestion would M for data monkey. This book will help you to start learning very easily.
Try this code using custom column:
if Text.Contains([Column Name], "Aop") then "Aop" else nullHope this helps!!
If this solved your problem, please accept it as a solution!!
Best Regards,
Shahariar Hafiz
1 Reply
- shafiz_p
Super User
Hi Rafi35
Best way to practice:- Use the power query editor: Spend time in power query editor. Practice creating query using interface, review query using advance editor.
- Learn by doing: Try to solve real world problem. Try to solve them using M language. Hands-on approach will help you understand how different function works together.
- Review and Refactor: Look back at your previous work and see if you can improve it.
- Read Books: My suggestion would M for data monkey. This book will help you to start learning very easily.
Try this code using custom column:
if Text.Contains([Column Name], "Aop") then "Aop" else nullHope this helps!!
If this solved your problem, please accept it as a solution!!
Best Regards,
Shahariar Hafiz