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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Surabhi1711
New Member

Append numbers from one table to another table

I need to append two columns from two separate tables into one new calculated column using DAX

 

Example:

Table1:

Surabhi1711_0-1668584164973.png

 

Table2 (with records starting from 1 to 24)

 

Surabhi1711_1-1668584214841.png

I need to append the value of 01 till 24 to each record of the Table1,

the Calculated Column should look like below:

2010070501

2010070502

and so on till 2010070524

and then 2010070601 and so on till 2010070524

and so on for other records.

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Surabhi1711 ,

You need to use crossjoin to create a new table base on the two table , refer:

vluwangmsft_0-1668666008395.pngvluwangmsft_1-1668666020612.png

TableC = CROSSJOIN(TableA,SELECTCOLUMNS(TableB,"column2",RIGHT(TableB[Column2],2)))

vluwangmsft_2-1668666044086.png

Column3 = TableC[DateID]&""&TableC[column2]

vluwangmsft_3-1668666106349.png

 

 

Best Regards

Lucien

View solution in original post

1 REPLY 1
v-luwang-msft
Community Support
Community Support

Hi @Surabhi1711 ,

You need to use crossjoin to create a new table base on the two table , refer:

vluwangmsft_0-1668666008395.pngvluwangmsft_1-1668666020612.png

TableC = CROSSJOIN(TableA,SELECTCOLUMNS(TableB,"column2",RIGHT(TableB[Column2],2)))

vluwangmsft_2-1668666044086.png

Column3 = TableC[DateID]&""&TableC[column2]

vluwangmsft_3-1668666106349.png

 

 

Best Regards

Lucien

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Carousel June 2024

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

2
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.