The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Solved! Go to Solution.
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)
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
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)
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
This will be useful for you:
User | Count |
---|---|
78 | |
77 | |
36 | |
32 | |
29 |
User | Count |
---|---|
91 | |
79 | |
57 | |
48 | |
48 |