I know of the m function Text.Proper which capitalizes all words in a sentence. However, I want to know how I can capitalize only the first word of a sentence?
Asked
Active
Viewed 125 times
3 Answers
2
Something along the lines of the following. You didn't specify any details
= Table.AddColumn(Source, "Converted", each Text.Upper(Text.Middle([Column1],0,1))&Text.Middle([Column1],1,Text.Length([Column1])))
horseyride
- 7,301
- 2
- 6
- 17
-
More or less the same as Alexis' solution, though a bit more complex, still also a +1 – intrixius Oct 29 '18 at 13:03
2
Try this, Excel style ;-)
let
Input = "text to capitalize",
Output = Text.Upper(Text.Start(Input,1)) & Text.End(Input,Text.Length(Input)-1)
in
Output
Daniel Herce
- 51
- 3
1
There are a couple of decent answers already, but here's another option that demonstrates a couple more functions:
Text.Upper(Text.At([Text],0)) & Text.Range([Text], 1, Text.Length([Text]) - 1)
Alexis Olson
- 36,898
- 7
- 37
- 62
-
This seems (together with the similar answers) the best way. Though, it surprises me that it is not a "standard" function... – intrixius Oct 29 '18 at 13:01