Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
alvin199
Helper III
Helper III

Text Transformation - Big & small capital

I have text data with mixture of big and small capital in a single column. The problem is some row starts with small capital letter like the first one on the After column. How can I maintain the first letter in small capital and transform to small capital after having big capital?

Transformation.png

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @alvin199 ,

 

According to your description, I did the test reference as follows:

col_change =
VAR FirstName =
    LEFT (
        SUBSTITUTE ( [col], ", ", "-" ),
        SEARCH ( "-", SUBSTITUTE ( [col], " ", "-" ) ) - 1
    )
VAR LastName =
    RIGHT (
        SUBSTITUTE ( [col], " ", "-" ),
        LEN ( SUBSTITUTE ( [col], " ", "-" ) )
            - SEARCH ( "-", SUBSTITUTE ( [col], " ", "-" ) )
    )
VAR F =
    UPPER ( LEFT ( FirstName, 1 ) )
        & LOWER ( RIGHT ( FirstName, LEN ( FirstName ) - 1 ) )
VAR L =
    UPPER ( LEFT ( LastName, 1 ) )
        & LOWER ( RIGHT ( LastName, LEN ( LastName ) - 1 ) )
RETURN
    F & " " & L

vhenrykmstf_0-1646190823275.png

 


If the problem is still not resolved, please point it out. Looking forward to your feedback.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-henryk-mstf
Community Support
Community Support

Hi @alvin199 ,

 

According to your description, I did the test reference as follows:

col_change =
VAR FirstName =
    LEFT (
        SUBSTITUTE ( [col], ", ", "-" ),
        SEARCH ( "-", SUBSTITUTE ( [col], " ", "-" ) ) - 1
    )
VAR LastName =
    RIGHT (
        SUBSTITUTE ( [col], " ", "-" ),
        LEN ( SUBSTITUTE ( [col], " ", "-" ) )
            - SEARCH ( "-", SUBSTITUTE ( [col], " ", "-" ) )
    )
VAR F =
    UPPER ( LEFT ( FirstName, 1 ) )
        & LOWER ( RIGHT ( FirstName, LEN ( FirstName ) - 1 ) )
VAR L =
    UPPER ( LEFT ( LastName, 1 ) )
        & LOWER ( RIGHT ( LastName, LEN ( LastName ) - 1 ) )
RETURN
    F & " " & L

vhenrykmstf_0-1646190823275.png

 


If the problem is still not resolved, please point it out. Looking forward to your feedback.


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 @v-henryk-mstf ,

 

May I know in FirstName & LastName, there is no "," in the col column.

 

I checked substitude function, this is the parameter: 

SUBSTITUTE(<text>, <old_text>, <new_text>, <instance_num>)

The "," is the second parameter so it is the old text that exit in the original col column.

 

Can you let me know which part of my understanding is incorrect?

 

VijayP
Super User
Super User

@alvin199 

Here you go ! File attached will help How I have done it in Power Query !

Share your Kudos !!

VijayP_0-1645968104149.png

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


VijayP
Super User
Super User

So you want iPhone should be as it is and Zenith should be zEnith ??




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


The After column is my data sample. The After column is my expectation. 

VijayP
Super User
Super User

@alvin199  This can be done in Power Query Editor , you can transform the column to Proper Format , i.e., iPhone to Iphone . Just right Click on column headers and use this option

VijayP_0-1645966487185.png

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Hi @VijayP ,

I knew about this method. But this will change the first letter in small capital (i) become big capital. This does not match my expectation. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors