- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

How to use Text Function to keep the Acronyms in capital and rest of the words in small letters
Hi memebers,
I have a situation,
I have a list of company names, thats all mixed:
Like this:
1. ABC DONAWAN
2. XYZ
3. John Smith
the out put i want is:
1. ABC Donawan
2. XYZ
3. John Smith
How can I get this outcome? if I try "Capitalize each word" in M Query, then XYZ becomes Xyz, but XYZ is an acronym and i want it to stay capital.
Can someone please help.
Thanks in advance. 🙂
regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Anonymous ,
According to your needs, you can try to use the upper and lower functions. Their function is to convert the letters specified in Text into upper and lower case. I did a test. Refer to the following:
col_N =
UPPER ( LEFT ( [susanne], 1 ) )
& LOWER ( RIGHT ( [susanne], LEN ( [susanne] ) - 1 ) )
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Anonymous ,
According to your needs, you can try to use the upper and lower functions. Their function is to convert the letters specified in Text into upper and lower case. I did a test. Refer to the following:
col_N =
UPPER ( LEFT ( [susanne], 1 ) )
& LOWER ( RIGHT ( [susanne], LEN ( [susanne] ) - 1 ) )
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@Anonymous
How do you identify which part is the acronym when they are mixed?
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi, it just makes sense looking at the data.
for example if a customer name is: AHI Roofing, then AHI is the acronym. Usually customer names have an acronym and then a word that makes sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@Anonymous
So if the 1st word is in all capitals then the rest should be converted to sentence case right?
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

hi,
this is a good example:
Output:
Dixon & Haddon
Pegasus Industrial Engineering Ltd
E R Freeman Ltd - Corporate
Allwin Steel Enterprises
Hope that makes more sense.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@Anonymous , Try like this , a new column in power query
List.First(Text.Split([column]," ")) & " " & Text.Proper(Text.Combine(List.LastN(Text.Split([column]," "),List.Count(Text.Split([Column])) -1) ," "))
or like
Text.Combine( {
List.First(Text.Split([column]," ")) ," " ,Text.Proper(Text.Combine(List.LastN(Text.Split([column]," "),List.Count(Text.Split([Column])) -1) ," "))
})
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

My bad,
I made a mistake and have now edited my original query.
But here is what i want:
Like this:
1. ABC DONAWAN
2. XYZ
3. John Smith
the out put i want is:
1. ABC Donawan
2. XYZ
3. John Smith
Regards

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
07-23-2017 12:41 AM | |||
05-23-2024 06:42 AM | |||
09-11-2023 05:42 AM | |||
10-23-2023 10:05 PM | |||
12-12-2024 09:03 AM |