Reputation: 1136
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?
Upvotes: 0
Views: 479
Reputation: 1
= Table.AddColumn(#"Previous step", "Custom", each Text.Combine({Text.Start([Column1], 1), Text.Middle(Text.Lower([Column1]), 1)}), type text)
Upvotes: 0
Reputation: 1
If you do the change in table, then
= Table.TransformColumns(#"Previous step",{{"Column name", each Text.Upper(Text.At(_,0)) & Text.Range(_, 1, Text.Length(_) - 1), type text}})
Upvotes: 0
Reputation: 40224
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)
Upvotes: 1
Reputation: 51
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
Upvotes: 2
Reputation: 21393
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])))
Upvotes: 2