In Power Query, if I have a table list this,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]Times to repeat[/TD]
[TD]Other columns[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]DEF[/TD]
[/TR]
</tbody>[/TABLE]
I want to repeat each Item by the number of times in the 'Times to repeat' column, with every other column just repeating the same values.
So given the above, I want an output like this,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]Times to repeat[/TD]
[TD]Other columns[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]DEF[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]DEF[/TD]
[/TR]
</tbody>[/TABLE]
Can I use List.Generate or Table.Repeat for this? Or what's the best way?
[TABLE="width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]Times to repeat[/TD]
[TD]Other columns[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]DEF[/TD]
[/TR]
</tbody>[/TABLE]
I want to repeat each Item by the number of times in the 'Times to repeat' column, with every other column just repeating the same values.
So given the above, I want an output like this,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]Times to repeat[/TD]
[TD]Other columns[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]DEF[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]DEF[/TD]
[/TR]
</tbody>[/TABLE]
Can I use List.Generate or Table.Repeat for this? Or what's the best way?