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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
ephramz
Helper II
Helper II

How do i duplicate rows

How do I duplciate rows based on column value in another table

E.g.

Table 1
Customers   Sales Number  Order Number  Year
Alex               1111111           111222            2015
Alex               1111111           111222            2016
Alex               1111111           111222            2017


Table 2
Customers   Sales Number  Order Number  Sales   
Alex               1111111           111222            200
Alex               1111111           111222            300
Alex               1111111           111222            400

Desired Output
Customers   Sales Number  Order Number  Sales   Year
Alex               1111111           111222            200     2015
Alex               1111111           111222            200     2016
Alex               1111111           111222            200     2017
Alex               1111111           111222            300     2015
Alex               1111111           111222            300     2016
Alex               1111111           111222            300     2017
Alex               1111111           111222            400     2015
Alex               1111111           111222            400     2016
Alex               1111111           111222            400     2017

I know that there is a custom column in the power quer editor, however im unsure what the formula might be.

The 2 table have matching columns "Customers   Sales Number  Order Number"

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@ephramz , merge on name, or order number and then expend

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

Crossjoin or generate with filter in DAX

https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

SivaMani
Resident Rockstar
Resident Rockstar

@ephramz,

Use Merge Queries in Query Editor - https://docs.microsoft.com/en-us/power-query/merge-queries-overview

  1. Select Merge Queries or Merge Queries As New (if you want the output as a new table)
  2. Choose the tables and join column (use Ctrl + Click to select multiple columns)
  3. Select Join Kind and click ok
  4. Check the last column and click the Expand icon on the column's right top side
  5. Choose the columns that you want
Best Regards,
Siva Mani
Proud to be a Super User!
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

2 REPLIES 2
SivaMani
Resident Rockstar
Resident Rockstar

@ephramz,

Use Merge Queries in Query Editor - https://docs.microsoft.com/en-us/power-query/merge-queries-overview

  1. Select Merge Queries or Merge Queries As New (if you want the output as a new table)
  2. Choose the tables and join column (use Ctrl + Click to select multiple columns)
  3. Select Join Kind and click ok
  4. Check the last column and click the Expand icon on the column's right top side
  5. Choose the columns that you want
Best Regards,
Siva Mani
Proud to be a Super User!
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

amitchandak
Super User
Super User

@ephramz , merge on name, or order number and then expend

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

Crossjoin or generate with filter in DAX

https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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