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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

First Name , Mid Name & Last name Split.

Dear All,

I need your support for a query about Name split, I have set of Full Name in which i have to split First Name, Mid Name & Last Name.

for First Name and Mid Name fourmula is working fine but for Last Name if i am applying the Dax fourmula then its considering First Name as a last Name. kindly find the snap shot below.

 

Nitin_Rajsoni_0-1673509839894.png

 

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi  @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.

vtangjiemsft_2-1673593276287.png

 

(2) We can create two calculated columns.

Flag = IF( ISERROR( SEARCH(" ", 'Table'[Full Name]) ), 0, 1 )
correct Last Name = IF('Table'[Flag]=0,BLANK(),'Table'[Last Name])

(3) Then the result is as follows.

vtangjiemsft_3-1673593321374.png

(4)Or you can click "Transform Data" to enter the Power Query editor and split the column according to the following operations.

Picture1.pngPicture2.pngPicture3.png

Refer this: Split first, middle and last name in Power BI Desktop - YouTube

 

Best Regards,

Neeko Tang

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

View solution in original post

1 REPLY 1
v-tangjie-msft
Community Support
Community Support

Hi  @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.

vtangjiemsft_2-1673593276287.png

 

(2) We can create two calculated columns.

Flag = IF( ISERROR( SEARCH(" ", 'Table'[Full Name]) ), 0, 1 )
correct Last Name = IF('Table'[Flag]=0,BLANK(),'Table'[Last Name])

(3) Then the result is as follows.

vtangjiemsft_3-1673593321374.png

(4)Or you can click "Transform Data" to enter the Power Query editor and split the column according to the following operations.

Picture1.pngPicture2.pngPicture3.png

Refer this: Split first, middle and last name in Power BI Desktop - YouTube

 

Best Regards,

Neeko Tang

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

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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