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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
jcastr02
Post Prodigy
Post Prodigy

joining columns together (name)

Names.png

I had a first name and last name column which I joined to "Name of team member", and then did a split column since the team members middle initial   was at beginning of last name ex.   Amy west  was showing as   M.West, Amy.    Is there a way I can join into a new column   "name of team member.1" and "name of team member.2"?  see pic above  thank you. 

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @jcastr02 ,

 

You need 2 measures as below:

 

Name of team member 1 =
VAR a =
    ISERROR ( SEARCH ( ".", SELECTEDVALUE ( 'Table'[Last Name] ) ) )
RETURN
    IF (
        a = TRUE (),
        CONCATENATE (
            SELECTEDVALUE ( 'Table'[Last Name] ) & ",",
            SELECTEDVALUE ( 'Table'[First Name] )
        ),
        LEFT ( SELECTEDVALUE ( 'Table'[Last Name] ), 1 )
    )
Name of team member 2 =
VAR a =
    ISERROR ( SEARCH ( ".", SELECTEDVALUE ( 'Table'[Last Name] ) ) )
VAR b =
    LEN ( SELECTEDVALUE ( 'Table'[Last Name] ) )
        - SEARCH ( ".", SELECTEDVALUE ( 'Table'[Last Name] ),, 0 )
VAR c =
    RIGHT ( SELECTEDVALUE ( 'Table'[Last Name] ), b )
RETURN
    IF (
        a = FALSE (),
        CONCATENATE ( c & ",", SELECTEDVALUE ( 'Table'[First Name] ) ),
        BLANK ()
    )

 

 

Finally you will see:

 

Untitled.png

 

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
 
Did I answer your question? Mark my post as a solution!

 

 

View solution in original post

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @jcastr02 ,

 

You need 2 measures as below:

 

Name of team member 1 =
VAR a =
    ISERROR ( SEARCH ( ".", SELECTEDVALUE ( 'Table'[Last Name] ) ) )
RETURN
    IF (
        a = TRUE (),
        CONCATENATE (
            SELECTEDVALUE ( 'Table'[Last Name] ) & ",",
            SELECTEDVALUE ( 'Table'[First Name] )
        ),
        LEFT ( SELECTEDVALUE ( 'Table'[Last Name] ), 1 )
    )
Name of team member 2 =
VAR a =
    ISERROR ( SEARCH ( ".", SELECTEDVALUE ( 'Table'[Last Name] ) ) )
VAR b =
    LEN ( SELECTEDVALUE ( 'Table'[Last Name] ) )
        - SEARCH ( ".", SELECTEDVALUE ( 'Table'[Last Name] ),, 0 )
VAR c =
    RIGHT ( SELECTEDVALUE ( 'Table'[Last Name] ), b )
RETURN
    IF (
        a = FALSE (),
        CONCATENATE ( c & ",", SELECTEDVALUE ( 'Table'[First Name] ) ),
        BLANK ()
    )

 

 

Finally you will see:

 

Untitled.png

 

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
 
Did I answer your question? Mark my post as a solution!

 

 

amitchandak
Super User
Super User

You have in text.combine M and concat in Dax

https://docs.microsoft.com/en-us/powerquery-m/text-combine

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  How can I just get value that has the name into one column?  If I concatenate, it will bring the values together, example west, amy should just show  in new column as West, Amy     (want to it disregard the "m")

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.