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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User
Super User

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]

 

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]

 

AlB
Super User
Super User

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?

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors