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
Jensej
Helper V
Helper V

Concatenate two fields in a measure

Hi!

 

So i have a stacked column chart that shows how many hours an Employee has worked for on different projects.

 

Axis = EmployeeName

Legend = Project

Value = Hours

 

Now i want to add Fullname to the Axis and since i have Lastname and Firstname in different columns i wanted to create a simple measure where i concatenate thoose two but i cant do it like this is seems. Im not able too choose thoose fields from the table. What can i do?

= CONCATENATE("NAME"," "+"First Name") 

 

 

 

2 ACCEPTED SOLUTIONS
AlB
Community Champion
Community Champion

Hi @Jensej 

Don't create a measure, create a new calculated column in your table:

NewAxisCol =
Table1[FirstName]  & " "  &  Table1[LastName]

 The use that column in the x axis of the chart

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

View solution in original post

amitchandak
Super User
Super User

@Jensej , You need to create a column, You can not use measure on-axis

example

Full Name= [NAME] & "," & [First Name]

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Jensej , You need to create a column, You can not use measure on-axis

example

Full Name= [NAME] & "," & [First Name]

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
AlB
Community Champion
Community Champion

Hi @Jensej 

Don't create a measure, create a new calculated column in your table:

NewAxisCol =
Table1[FirstName]  & " "  &  Table1[LastName]

 The use that column in the x axis of the chart

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

 Thanks! @amitchandak @AlB Thought i could do this with a measure.  I forgot to say Column 1 is text and Column 2 ist number and now when i want to concatenate them i get this error. "Cannot convert value "blabla"  from type text into type number" How can i turn the Number into text?

AlB
Community Champion
Community Champion

@Jensej 

It should conver the number to text automatically when applying the & . In any case, try this:

CONVERT(Table1[Column],STRING)
 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

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!

December 2024

A Year in Review - December 2024

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