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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Shreesefwere
Helper IV
Helper IV

dax query to convert  first word of rows is capital.

here is the table

A1

sam disouza

 

=UPPER(LEFT(A1,SEARCH(" ",A1)-1))&PROPER(MID(A1,FIND(" ",A1),LEN(A1)))

 

error message unable to find 

The search Text provided to function 'FIND' could not be found in the given text.

 

SAME  FOR 

Failed to resolve name 'PROPER'. It is not a valid table, variable, or function name.

 

please note i do not want in transform data option

2 ACCEPTED SOLUTIONS

Hi @Shreesefwere 

just paste below code in calculated column not measure

Column =
VAR _lastName =
MID (
'Person'[# of Person],
SEARCH ( " ", 'Person'[# of Person], 1, 1 ),
LEN ( 'Person'[# of Person] ) - 1
)
VAR _firstName =
MID ( 'Person'[# of Person], 1, SEARCH ( " ", 'Person'[# of Person], 1, 1 ) - 1 )
RETURN
UPPER ( LEFT ( _firstName, 1 ) )
& RIGHT ( _firstName, LEN ( _firstName ) - 1 ) & " "
& UPPER ( LEFT ( TRIM ( _lastName ), 1 ) )
& RIGHT ( TRIM ( _lastName ), LEN ( TRIM ( _lastName ) ) - 1 )

 

I hope this time you may get correct answer!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

Khushidesai0109
Super User
Super User

Spoiler
Spoiler
 
Hiii 
for new column 
just add the following Dax 


CapitalizedFullNameff = 

VAR SplitName =

    TRIM ( NAmer[Column1] )

VAR FirstSpace =

    SEARCH ( " ", SplitName, 1, LEN ( SplitName ) )

VAR FirstWord =

    LEFT ( SplitName, FirstSpace - 1 )

VAR RestOfName =

    MID ( SplitName, FirstSpace + 1, LEN ( SplitName ) - FirstSpace )

RETURN

    UPPER ( LEFT ( FirstWord, 1 ) )

        & LOWER ( RIGHT ( FirstWord, LEN ( FirstWord ) - 1 ) ) & " "

        & UPPER ( LEFT ( RestOfName, 1 ) )

        & LOWER ( RIGHT ( RestOfName, LEN ( RestOfName ) - 1 ) )

Don't forget to give thumbs up and accept this as a solution if it helped you!!



Proud to be a Super User!!

View solution in original post

24 REPLIES 24

Shreesefwere_0-1712113718566.png

 

same error

 

hi @Shreesefwere 
table name must be in single quotes. you have missed the ' quotes to end table name.

 

Uzi2019_0-1712054830283.png

 

 

check line by line my code and correct your comma issue.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

different issue

 

Shreesefwere_0-1712056151471.png

here is the code

 

Column3 =
VAR _lastName =
    MID (
        Person[# of Person],
        SEARCH ( " ", Person[# of Person], 1, 1 ),
        LEN ( Person[# of Person]) - 1
    )
VAR _firstName =
    MID ( Person[# of Person], 1, SEARCH ( " ", Person[# of Person], 1, 1 ) - 1 )
RETURN
    UPPER ( LEFT ( _firstName, 1 ) )
        & RIGHT ( _firstName, LEN ( _firstName ) - 1 ) & " "
        & UPPER ( LEFT ( TRIM ( _lastName ), 1 ) )
        & RIGHT ( TRIM ( _lastName ), LEN ( TRIM ( _lastName ) ) - 1 )

Hi @Shreesefwere 

just paste below code in calculated column not measure

Column =
VAR _lastName =
MID (
'Person'[# of Person],
SEARCH ( " ", 'Person'[# of Person], 1, 1 ),
LEN ( 'Person'[# of Person] ) - 1
)
VAR _firstName =
MID ( 'Person'[# of Person], 1, SEARCH ( " ", 'Person'[# of Person], 1, 1 ) - 1 )
RETURN
UPPER ( LEFT ( _firstName, 1 ) )
& RIGHT ( _firstName, LEN ( _firstName ) - 1 ) & " "
& UPPER ( LEFT ( TRIM ( _lastName ), 1 ) )
& RIGHT ( TRIM ( _lastName ), LEN ( TRIM ( _lastName ) ) - 1 )

 

I hope this time you may get correct answer!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.