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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
EJA12
New Member

Extract the first two words separated by space

How to extract the first two words separated by space in another column, example I have the name MARIA ANGEL GOMEZ, I want that in another column only give me the name MARIA ANGEL and that it works with all the values of the column

1 ACCEPTED SOLUTION
Kishore_KVN
Super User
Super User

Hello @EJA12 , We can do this easily using split columns in Power Query editor. But if you want to do this only in Power BI Desktop, you can use below DAX expressions:

My sample data is like this:

Kishore_KVN_0-1687452326186.png

New column calculation will be like this:

Split = 
Var Replace_value = SUBSTITUTE(Data[Name]," ","+",2)
Var Find_Value = FIND("+",Replace_value,1,0)
Var Split_Value = IF(Find_Value>0,LEFT(Replace_value,Find_Value-1),Data[Name])
Return
Split_Value

Output looks like this:

Kishore_KVN_1-1687452375109.png

 

If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

 

 

 

View solution in original post

1 REPLY 1
Kishore_KVN
Super User
Super User

Hello @EJA12 , We can do this easily using split columns in Power Query editor. But if you want to do this only in Power BI Desktop, you can use below DAX expressions:

My sample data is like this:

Kishore_KVN_0-1687452326186.png

New column calculation will be like this:

Split = 
Var Replace_value = SUBSTITUTE(Data[Name]," ","+",2)
Var Find_Value = FIND("+",Replace_value,1,0)
Var Split_Value = IF(Find_Value>0,LEFT(Replace_value,Find_Value-1),Data[Name])
Return
Split_Value

Output looks like this:

Kishore_KVN_1-1687452375109.png

 

If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.