Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Rafi35
New 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?

1 ACCEPTED SOLUTION
shafiz_p
Resident Rockstar
Resident Rockstar

Hi @Rafi35 
Best way to practice:

  1. Use the power query editor: Spend time in power query editor. Practice creating query using interface, review query using advance editor.
  2. 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.
  3. Review and Refactor: Look back at your previous work and see if you can improve it.
  4. 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 null

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

Best Regards,
Shahariar Hafiz

View solution in original post

1 REPLY 1
shafiz_p
Resident Rockstar
Resident Rockstar

Hi @Rafi35 
Best way to practice:

  1. Use the power query editor: Spend time in power query editor. Practice creating query using interface, review query using advance editor.
  2. 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.
  3. Review and Refactor: Look back at your previous work and see if you can improve it.
  4. 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 null

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

Best Regards,
Shahariar Hafiz

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.