Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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.
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.
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.
@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
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.
@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
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
@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) ," "))
})
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
126 | |
115 | |
69 | |
62 | |
46 |