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
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
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.