Forum Discussion
Anonymous
3 years agoNot applicable
Need help with Power Query - Creating new rows for non-ending team members
I'm working on a Power Query transformation in Power BI, and I'm facing a challenge that I need assistance with. I have a table with four columns: L0, L1, L2, and L3, representing hierarchical levels...
- 3 years ago
Hi
= Table.Distinct(
Table.FromRows(
List.TransformMany(
Table.ToRows(Source),
each {1..4},
(x,y) => List.FirstN(x,y) & List.Repeat({null}, 4-y)
),
type table [L0 = text, L1 = text, L2 = text, L3 = text])
)Stéphane
slorin
3 years agoSuper User
Hi
= Table.Distinct(
Table.FromRows(
List.TransformMany(
Table.ToRows(Source),
each {1..4},
(x,y) => List.FirstN(x,y) & List.Repeat({null}, 4-y)
),
type table [L0 = text, L1 = text, L2 = text, L3 = text])
)
Stéphane