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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
New2PowerBI
Helper III
Helper III

Concatenate Values (Where's Comma and Space)

I've concatenated values in Excel before but I can't seem to get a comma and space in between the values in Power BI.  Here is what I have:

Employee Name = CONCATENATE(KPL_HISTORYROSTER_01[lastname],KPL_HISTORYROSTER_01[firstname])

 

The values I pull are good, just need to figure out how to insert a comma and space after the [lastname]; I've tried " " and & in the function but get errors. 

 

🙂

 

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

You could try this :

 

Employee Name = CONCATENATE(CONCATENATE('KPL_HISTORYROSTER_01'[lastname],", "),'KPL_HISTORYROSTER_01'[firstname]) 

 

or

 

Employee Name = 'KPL_HISTORYROSTER_01'[lastname] & ", " & 'KPL_HISTORYROSTER_01'[firstname]

 

or

 

Do the transform in the Query Editor as per the previous suggestion


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

5 REPLIES 5
GregB86
New Member

This works for me
firstandlast = CONCATENATE([Driver First Name]," "&[Driver Last Name])
Phil_Seamark
Microsoft Employee
Microsoft Employee

You could try this :

 

Employee Name = CONCATENATE(CONCATENATE('KPL_HISTORYROSTER_01'[lastname],", "),'KPL_HISTORYROSTER_01'[firstname]) 

 

or

 

Employee Name = 'KPL_HISTORYROSTER_01'[lastname] & ", " & 'KPL_HISTORYROSTER_01'[firstname]

 

or

 

Do the transform in the Query Editor as per the previous suggestion


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thank you!!  All suggested solutions worked; thanks again!

Utilizando o suplemento Power Pivot, no Microsoft Excel 2016, você pode fazer isto:

 

=CONCATENATE(CONCATENATE('Tabela_1'[Campo_1];" - ");'Tabela_2'[Campo_2])

 

Utilize aspas ( " ), ao invés de apóstrofo ( ' ).

paulag
Advocate I
Advocate I

you can carry this step out in the query editor

 

add a custom column then the formula would be

KPL_HISTORYROSTER_01[lastname] &" , "&KPL_HISTORYROSTER_01[firstname]

 

This will yeild an M query that reads 

Table.AddColumn(#"Changed Type", "Custom", each [lastname]&" , "&[[firstname])

 

In the model you can also create a DAX column using the same as above.  Insert a custom column and use the formula(or expression) KPL_HISTORYROSTER_01[lastname] &" , "&KPL_HISTORYROSTER_01[firstname]

 

Hope that helps 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.