Does Tableau have a PROPER() Function?

By: Eric Parker

Eric Parker lives in Seattle and has been teaching Tableau and Alteryx since 2014. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email. You can also sign up for a Tableau Office Hour to work with him directly!

*May 2023 Update: Please note that Tableau 2022.4 and later now have a native PROPER() function! No need for the workarounds discussed in the video below unless you are using an earleir version of dealing with those accrused Irish last names

Original Post:

Does Tableau have a PROPER() function? No! But can we convert strings to proper case anyways with some ingenuity? Probably! Check out this video to learn how you can apply proper case to single word, multiple words and even deal Irish style names in Tableau!

Here is a link to the worksheets on Tableau Public.

Here are the calculations from the video.

Proper (1 Word)

First Name - Proper

UPPER(LEFT([First Name],1)) + LOWER(MID([First Name],2))

Proper (2+ Words)

Customer First Name - Proper

UPPER(LEFT([Customer Name UPPER],1))

+

LOWER(MID(SPLIT([Customer Name UPPER]," ",1),2))

Customer Second Name - Proper

UPPER(LEFT(SPLIT([Customer Name UPPER]," ",2),1))

+

LOWER(MID(SPLIT([Customer Name UPPER]," ",2),2))

Customer Third Name - Proper

UPPER(LEFT(SPLIT([Customer Name UPPER]," ",3),1))

+

LOWER(MID(SPLIT([Customer Name UPPER]," ",3),2))

Customer Full Name - Proper

TRIM(

[Customer First Name - Proper]

+ " " +

[Customer Second Name - Proper]

+ " " +

[Customer Third Name - Proper]

)

Dealing with Irish/Scottish Names

Customer Second Name - For Irish Calc

SPLIT([Customer Name UPPER]," ",2)

Last Name - Proper (Irish Scenario)

IF STARTSWITH([Customer Second Name - For Irish Calc],"O'") = TRUE OR STARTSWITH([Customer Second Name - For Irish Calc],"MC") = TRUE OR STARTSWITH([Customer Second Name - For Irish Calc],"DE") = TRUE

THEN

UPPER(LEFT([Customer Second Name - For Irish Calc],1)) + LOWER(MID([Customer Second Name - For Irish Calc],2,1))

+ UPPER(MID([Customer Second Name - For Irish Calc],3,1)) + LOWER(MID([Customer Second Name - For Irish Calc],4))

ELSE

UPPER(LEFT([Customer Second Name - For Irish Calc],1)) + LOWER(MID([Customer Second Name - For Irish Calc],2))

END

Feel feel to extrapolate from there using guidance from the video for your own situations!

Top 10 Things I Wish Tableau Would Change

Tableau Bar in Bar Chart Options

0