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
jvelling
Frequent Visitor

Create one new table by concatenation of two columns from different tables

Hi everyone,

 

I have been looking on the forums, but cannot find an answer for the following question:

 

How can I create a new calculated table by concatenating two columns from different tables? 

 

Table 1: Date table

Date

01-01-2020

02-01-2020

03-01-2020 etc

 

Table 2: Code table

Code

B002

B003

T003

 

New table: Unique key (solution)

KEY

01-01-2020B002

02-01-2020B002

01-01-2020B003

02-01-2020B003

etc. 

 

Is there a sollution for this? Dispite the table will consist of many rows, it doesn't look too difficult to me. Yet, I cannot find a proper sollution to this. 

 

I look forward to hearing from you. Many thanks in advance. 

 

Jaap

1 ACCEPTED SOLUTION
jaideepnema
Solution Sage
Solution Sage

Hi @jvelling ,

Is this what you are looking for ?

jaideepnema_0-1613029114721.png

If Yes then combine the two tables and create a new table as shown below:

SummarizedTable = SUMMARIZECOLUMNS(Dates[Date Values],'Text'[Text Values])
Then Create a calculated column to concat the two values:
Concat Column = CONCATENATE(SummarizedTable[Date Values],SummarizedTable[Text Values])
Here is the link to download the same file :
 
Please accept this as a solution if this resolves your query 😀

View solution in original post

3 REPLIES 3
jaideepnema
Solution Sage
Solution Sage

@jvelling 
That is because of Cross Join between these two tables which is giving soo many rows. I would recommend if there is a common key between these two tables then you can join/merge these tables in Power Query Editor basis that key so that the total number of records are comparitively less. 

jaideepnema
Solution Sage
Solution Sage

Hi @jvelling ,

Is this what you are looking for ?

jaideepnema_0-1613029114721.png

If Yes then combine the two tables and create a new table as shown below:

SummarizedTable = SUMMARIZECOLUMNS(Dates[Date Values],'Text'[Text Values])
Then Create a calculated column to concat the two values:
Concat Column = CONCATENATE(SummarizedTable[Date Values],SummarizedTable[Text Values])
Here is the link to download the same file :
 
Please accept this as a solution if this resolves your query 😀

Hi @jaideepnema ,

 

Exactly the solution I was looking for!! 

Do you know if there is also a alternative less harmfull to the model? I now have a table consisting of almost 2 million rows, which makes the model relatively slow.

 

Thanks in advance!!

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.