Forum Discussion
Dicken
Post Prodigy
21 days agoinsert values in nested lists except last
I want to insert rows into a list / table , i have used lists here for clarity, but not the last so { { 1,2,3}, {1,2,3} , { 1,2,3} } = { 1,2,3,"X"} , {1,2,3,"X"} , {1,2,3}} I have two meth...
- 20 days ago
Another solution
= List.ReplaceValue(
List.RemoveLastN(Source,1) ,
each _ &{"X"},
null,
(x,y,z)=>y(x))
& List.LastN(Source, 1)Stéphane
ZhangKun
Super User
20 days agolet Source = { {1,2,3}, {4,5,6}, {7,8,9} , {10,11,12}}, p = List.Count(Source) - 1, addlists = List.Generate( ()=> 0, each _ <= p, each _ + 1, each if _ = p then Source{p} else Source{p} & {"X"} ) in addlists