Forum Discussion

CCHarrison's avatar
CCHarrison
Regular Visitor
1 year ago
Solved

Converting whole numbers to decimals with row-wise division

Hello, I am failing to achieve a transform that seems like it should be easy. I would greatly appreciate some insight into how to make this work. I am trying to write a function to convert tables l...
  • AlienSx's avatar
    1 year ago
    Table.FromList(
        Table.ToList(
            Tbl, 
            (x) => List.FirstN(x, 2) & 
                List.Transform(
                    List.Skip(x, 3), 
                    (z) => if x{2} = 0 then null else z / x{2}
                )
        ),
        each _,
        List.RemoveRange(Table.ColumnNames(Tbl), 2, 1)
    )