Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Convert first letter into upper case

knozawa
11 - Bolide

Hello,

 

I would like to convert first letter into Upper case and rest is lower case.

For example:

 BeforeAfter
1APPLEApple
2bananaBanana
3LeMoNLemon

 

I could use text to column tool and separate the first letter and the rest of letters. And I convert the first split into upper case, then the second split into lower case.  Then combine them together.  However, I am wondering if there is simpler way to convert the fist letter into Upper case at once.

 

Sincerely,

Kazumi

12 REPLIES 12
MarqueeCrew
20 - Arcturus
20 - Arcturus
Titlecase([Before])

That should work.

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
RodL
Alteryx Alumni (Retired)

I would use the following Expression...

 

Uppercase(Left([Data], 1)) + Lowercase(Substring([Data],1,100))

 

The "100" at the end should be the maximum length of the string.

RodL
Alteryx Alumni (Retired)

@MarqueeCrew

Dang, I make things so complicated. ;-p

I always forget about the TitleCase() function.

MarqueeCrew
20 - Arcturus
20 - Arcturus

Really @RodL?

 

Maybe I returned the favor to you.

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
BenMoss
ACE Emeritus
ACE Emeritus

titlecase() is definitely the way to go here, but we could also make RodL's formula dynamic (rather than stating the number of characters) by doing the following...

 

uppercase(left([Data],1)) + lowercase(right([data],length([data])-1))

adwrd2020
5 - Atom

I would like to suggest our new online case converter.

 

andre347
10 - Fireball

Why would we use a third-party web-app over just a formula?

ChrissD
7 - Meteor

Super useful, I've used this work around to get Sentence case. Title case is no good to me. 

thomas_vdb
7 - Meteor

On one-word expressions, both would return the same result.

 

However, Title Case will capitalize the first letter of every word. 


The formula proposed however is closer to sentence case, in which only the 1st letter of the sentence is capitalized.

 

So both options are correct, depending on your context.

 

For the formula option, be sure you do not have leading spaces...

 

 

Labels
Top Solution Authors