Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
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:
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).
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:
Desired output:
NewStep=Table.Combine(Table.Group(PreviousStep,"Name",{"n",each let a=Table.Last(_),b=Table.FromRecords(List.Transform({1..10},each a&[Age=a[Age]+1,Job="Professor",Country=null,Married=null,#"Having Children"=null,Date=a[Date]+Duration.From(_)])) in if a[Migrant]="Yes" then _&b else _})[n])
Well, problem is with the hardcoding, the job won't be professor alway, the age won't be 1 year over the latest record always, I need something more dynamic to get me the latest record linked to this name, is this something possible, you think?
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 4 |