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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Krcmajster
Helper IV
Helper IV

Duplicate values from another table based on a list

Hi everyone

I want to create a table where the values are duplicated based on a list. I believe it’s easier on example

Table1
Id value1 value2.
1
2
3


List on which duplicates are made (not a table, just need these values)
A
B
C

Table2
ID. List value
1. A
1. B
1. C
2. A
2. B
2. C
3. A
3. B
3. C

Thanks
1 ACCEPTED SOLUTION
LivioLanzo
Solution Sage
Solution Sage

Hello @Krcmajster

 

You would need to perform a CROSS JOIN:

 

Table = 
CROSSJOIN(
    DATATABLE( "ID", INTEGER, { {1}, {2}, {3} } ),
    DATATABLE( "Value", STRING, { {"A"}, {"B"}, {"C"} } )
)

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

2 REPLIES 2
LivioLanzo
Solution Sage
Solution Sage

Hello @Krcmajster

 

You would need to perform a CROSS JOIN:

 

Table = 
CROSSJOIN(
    DATATABLE( "ID", INTEGER, { {1}, {2}, {3} } ),
    DATATABLE( "Value", STRING, { {"A"}, {"B"}, {"C"} } )
)

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Thanks @LivioLanzo I adjusted a bit but that did the trick

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.