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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jeff2Jets
Helper III
Helper III

Create duplicate rows in a table

I know this sounds a bit crazy, but...

 

I have a table with one row that I would like to duplicate 19 times. There is one column I would like to change for each row. Is there a way to do that in Power Bi or am I forced to do it manually in the .csv file before ingesting into Power BI. I am trying to eliminate any manual steps.

1 ACCEPTED SOLUTION
dk_dk
Super User
Super User

Hi @Jeff2Jets 

 

 

As HotChilli mentioned, there are ways to do this automatically, depending on what the change is that you would like to do for each row.

Here is an example:

Let's say you have your data that is a single row with two columns:

dk_dk_0-1726224330592.png


Assume you want to duplicate this 19 times and have a third column that is number from 1-20 (different for each row), while Col2 will remain 1 for all rows.

You can create a helper table in Power Query:

let
Source = List.Numbers(1, 20),
Table = Table.FromList(Source, Splitter.SplitByNothing(), {"Numbers"})
in
Table


Which will create 20 rows of data.


You can go back to your original data, and do a full outer merge with the helper table. After expanding

 your query should look like this:

dk_dk_1-1726224481331.png

 

Then you can select all the rows except the one from the helper table, and go to Transform > Fill > Up (or Down, depending on whether your one row is at the top or the bottom of the data). Then you can filter out the null from the Helper column, and you are left with your original data duplicated 19 times (resulting in 20 rows) where one column is different for each row, but the rest is the same.


I hope this helps! If your usecase with the one changing column is different, please specify what the changing column should be and hopefully we can help you further!

Best,
Daniel

 






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

Proud to be a Super User!





View solution in original post

2 REPLIES 2
dk_dk
Super User
Super User

Hi @Jeff2Jets 

 

 

As HotChilli mentioned, there are ways to do this automatically, depending on what the change is that you would like to do for each row.

Here is an example:

Let's say you have your data that is a single row with two columns:

dk_dk_0-1726224330592.png


Assume you want to duplicate this 19 times and have a third column that is number from 1-20 (different for each row), while Col2 will remain 1 for all rows.

You can create a helper table in Power Query:

let
Source = List.Numbers(1, 20),
Table = Table.FromList(Source, Splitter.SplitByNothing(), {"Numbers"})
in
Table


Which will create 20 rows of data.


You can go back to your original data, and do a full outer merge with the helper table. After expanding

 your query should look like this:

dk_dk_1-1726224481331.png

 

Then you can select all the rows except the one from the helper table, and go to Transform > Fill > Up (or Down, depending on whether your one row is at the top or the bottom of the data). Then you can filter out the null from the Helper column, and you are left with your original data duplicated 19 times (resulting in 20 rows) where one column is different for each row, but the rest is the same.


I hope this helps! If your usecase with the one changing column is different, please specify what the changing column should be and hopefully we can help you further!

Best,
Daniel

 






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

Proud to be a Super User!





HotChilli
Super User
Super User

I'm sure it's possible.  What are the details? Do the changed values depend on values in the table (for each row) or are they a set of 19 values that you have in a separate list/table?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.