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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Concatenation from two different tables - Explanation Needed

Using the New Column function, I am attempting to concatenate a column from one table with a column in another table.

 

Depending on which table I create the column, it either recognizes one data element or the other.  What's up?

 

 

Tabel A = ID (formatted as Whole Number)

Table B = Product Category (Formatted as Text)

 

Because these live in two different tables, it doesn't seem to recognize that I want to concatenate two elements from two different tables?

 

Thoughts?

 

8 REPLIES 8
Greg_Deckler
Community Champion
Community Champion

I believe that you want to create a Merge or Append query. Kind of sounds like a Merge query is what you are describing.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler

 

Possibly, though I am not sure how to do this?

 

I am siply trying to create a third column in my data that combines the Product with the ID.

 

Becasue they live in two different tables, the Concatenate function doesn't work (but would if both data elements were in the same table).

 

Recommendations?

Can you post a short sample of your data? What I am wondering is if there is a common key between your tables. In the Query Editor, on the Home tab all the way to the right is the "Merge Queries" link. This allows you to merge two queries as you are suggesting as long as you have some kind of common key between them.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler

 

I apprecitate that, however I don't think I want to merge the queries.

 

Do we agree that a CONCATENATE function is not available when there are two tables?

 

Thanks,

Might be able to use it if you use RELATED or RELATEDTABLE. You could also look at using LOOKUPVALUE function. I'm still not clear what you are trying to accomplish. If you would post sample data and sample output that would greatly assist.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler

 

Wish I could post a sample dataset...I cannot.

 

I am siply trying to combine the the value from one column in Table A with a column in Table B.

 

i.e. 

 

Table A  = Apple

Table B = 123456

 

New column equals "Apple 123456"

Appreciate your interest and advice.

 

Thanks,


Adam

 

@Anonymous - We don't need actual data, just sample data that is representative of your data. Do you really have just a single column in your data tables? Is it at least in the same order for both? If it is, you might be able to add an Index column on import for both and relate them that way via the Index columns.

 

The issue I think that we are all struggling with is that you want to concatenate two values from two separate tables but I do not see anything in any of your posts that shows how these tables are related to one another. That is going to be a requirement for any solution, a way to say that "Apple" is related to "123456". If there is no way to relate these two things programmatically I don't see a solution unless you would manually create a relationship table but at that point, you would already have the solution in manually creating that table.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

As mentioned by @smoupre you can concatenate vlaues from two separate tables as long as there is an established relationship between the two by nesting the RELATED function inside CONCATENATE.

 

Column  = CONCATENATE(Table1[column], RELATED(Table2[column])) worked for me when I tested.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.