Adding Extra Virtual Rows to a Table

Magdoulin

Board Regular
Joined
Jan 11, 2013
Messages
73
Hi Guys,

Hope you all are doing great.

I think what I’m about to ask should be a bit complicated, but I count on your excellent knowledge of power query.

I’ve that table at the bottom. What I wish to accomplish with the power query to add 10 extra rows, extending the column: Date, so the series would be from 8/1/2021 to 8/15/2021, but this occurs only in case column: Migrant value is: Yes, taking in account that:

  1. The row to repeat is the latest entry of this particular name (meaning, that we will need to add 10 extra rows for the First Person only, not the Second Person, and the new rows will have dates from 8/6/2021 till 8/15/2021 and the age in these extra columns would be: 46, not 45, and the job is: Professor, not Teacher).
  2. The newly added rows will need to have some of the columns empty, such as column: Country, column: Married and column: Having Children, so, the newly added rows should have the content of column: Name and column: Age and column: Job only.
Is it some thing that could be done? I think yes, but how? I’m not quite sure.



Current dataset:

r/PowerQuery - Adding Extra Virtual Rows to a Table


Desired output:

r/PowerQuery - Adding Extra Virtual Rows to a Table
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
And here:

And here:
 
Upvote 0
And added here but it is pending approval:
direct link after approving the pending post:
 
Upvote 0

Forum statistics

Threads
1,223,701
Messages
6,173,920
Members
452,539
Latest member
deeme

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top