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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
urayz
New Member

Abbreviate People Last Name

My data have column that contains people names and I want to abbreviate the last name of these people names.

 

For Example: My Name Uray Zulfikar --> the result will be Uray Z

 

Any recomendations DAX Formula or M Formula??

Thank you in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @urayz,

What is the format of the field people names ? Does it include only first name and last name ? From the example you provided , the format seems like first name + one space + last name , and finally gets the first name and the first character of last name . If so , you can create a calculated column with the following formula to get:

1) The people name only include first name and last name ( for example: Jack Jones), you can create the below calculated column

    AbbreName =mid('Name'[Name],1,find(" ",'Name'[Name],1)+1)

 2) The people name include first name, middle name and last name ( for example: Jessie Tony Tessy ), you can create the below calculated column

AbbreName = MID('Name'[Name],1, FIND ( "@",SUBSTITUTE ( 'Name'[Name], " ","@",LEN ( 'Name'[Name] )- LEN ( SUBSTITUTE ( 'Name'[Name], " ", "" ))),1)+1)

abbre name.JPG

 

If the above methods are not applicable in your scenario, please provide the related table structure and more sample data(exclude sensitive data).

 

Best Regards

Rena

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @urayz,

What is the format of the field people names ? Does it include only first name and last name ? From the example you provided , the format seems like first name + one space + last name , and finally gets the first name and the first character of last name . If so , you can create a calculated column with the following formula to get:

1) The people name only include first name and last name ( for example: Jack Jones), you can create the below calculated column

    AbbreName =mid('Name'[Name],1,find(" ",'Name'[Name],1)+1)

 2) The people name include first name, middle name and last name ( for example: Jessie Tony Tessy ), you can create the below calculated column

AbbreName = MID('Name'[Name],1, FIND ( "@",SUBSTITUTE ( 'Name'[Name], " ","@",LEN ( 'Name'[Name] )- LEN ( SUBSTITUTE ( 'Name'[Name], " ", "" ))),1)+1)

abbre name.JPG

 

If the above methods are not applicable in your scenario, please provide the related table structure and more sample data(exclude sensitive data).

 

Best Regards

Rena

amitchandak
Super User
Super User

In M , if only have First Name and Last Name

= Text.Start([Name],Text.PositionOf([Name]," ")+2)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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