Forum Discussion

Dicken's avatar
Dicken
Icon for Post Prodigy rankPost Prodigy
21 days ago
Solved

insert 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...
  • slorin's avatar
    slorin
    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