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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vitexo87
Post Prodigy
Post Prodigy

how to concatenate two fields of different data formats and different tables

how to concatenate two fields of different data formats and different tables

6 REPLIES 6
Greg_Deckler
Super User
Super User

@vitexo87 - If the tables are related with a 1:1 relationship than @Sean's formula will work. Essentially the syntax to refer to another table/column is "Table[Column]". But the question is, are the two tables related and is the relationship 1:1?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler @Sean

 

are two dimensions that are part of a star model they relacionan with one another through the fact table, the relationship is always fact table 1: N

 

and if these two tables are not related? how about it? it would still be possible to concatenate?

Hi @vitexo87,

 

To concatenate two column values from two different tables, it requires relationship between those tables. In your scenario, you can try to use LOOKUPVALUE function  to retrieve the column values from another table then perform concatenate.

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-qiuyu-msft @Sean

 

could you give me a more specific example of how to use this function? because I tried to apply it in many ways and had no result

Hi @vitexo87,

 

Please take a look at @Sean's DAX expressions in this thread: Need to do a lookup value from 1 table and return a value from a match in a 2nd table (many to one).

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sean
Community Champion
Community Champion

New Column = Table1[Column1]&" - "&RELATED(Table2[Column2])

 

OR if you want in reverse order

 

New Column = RELATED(Table2[Column2])&" - "&Table1[Column1]

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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