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
vitexo87
Post Prodigy
Post Prodigy

concatenate values

I need to unite the values of fields of type text in two different tables, how can I do?

1 ACCEPTED SOLUTION

Hi @vitexo87,

 

You can nested CONCATENATE() within CONCATENATE() to add concatenate more characters you need.

 

CONCATENATE(string_expression,CONCATENATE(string_expression,string_expression))

 

Regards,

View solution in original post

8 REPLIES 8
qwertzuiop
Advocate III
Advocate III

Hello there,

 

To connect my divisions, I use this. I wanted to share them with you.

Relation = [startLocation] & " ->" & [targetLocation)]
 
In addition, any string can be selected as the connection: Here ->
 
Cheers qwertzuiop

Well it depends. Are the tables related?  Are you writing a measure or a calc column?  Why do you want to do this - IE what are you trying to achieve and why?



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

The tables are related and I'm wanting to apply to a measure

Hi vitexo87,

 

If these two tables are related, you can use LOOKUPVALUE() function to import the expected column into current table based on the related column. And concatenate it with existing column.

 

=CONCATENATE(table1[Column],

LOOKUPVALUE(table2[ExpectColumn],table2[RelatedColumn],table1[RelatedColumn])

)

 

Then involve this calculated column in your measure.

 

Reference:
LOOKUPVALUE Function (DAX)

CONCATENATE Function (DAX)

 

Regards,

 

What if I need to add a character in the middle of the information that will be formed, for example a "-"?

Hi @vitexo87,

 

You can nested CONCATENATE() within CONCATENATE() to add concatenate more characters you need.

 

CONCATENATE(string_expression,CONCATENATE(string_expression,string_expression))

 

Regards,

I would usually just do the excel way ie. =(Value1)&" - "&(Value 2), I find it quicker and easier then using a function. 

Ok, you assuming you are writing a measure over your data table, you can use the RELATED() function to do what you want. https://msdn.microsoft.com/en-us/library/ee634202.aspx

 

If you are writing a measure over a lookup table, there is a RELATEDTABLE function, but this may be an issue as it will return multiple rows of data.



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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.