Forum Discussion

informer's avatar
informer
Helper I
1 year ago
Solved

PWQ - List.Accumulate + Table.TransformColumns for expanding mutiple values fields

Hi,   I want to expand mutiple values columns by creating as many new lines as there are multiple values in a field. An illustration is worth more than words   My initial data set   Cost Item|V...
  • informer's avatar
    1 year ago

    Solution

     

    = let
            lstColName = Table.ColumnNames(Typage) //, anyOut = lstColName
            ,lstFieldForExpand = List.Skip (lstColName, 2) //, anyOut = lstFieldForExpand
            ,tblWithList = Table.TransformColumns( Typage,List.Transform(lstFieldForExpand, each {_, each Text.Split(_,",")})) , anyOut = tblWithList
        in anyOut