Steps:
1. Convert all columns to Text to allow text functions
This allows us to use the Splitter text function on all columns simultaneously
The data type can be changed back as needed later
2. Convert each cell value to a list using Splitter function
Use two formulas:
Table.TransformColumns
Splitter.SplitTextByDelimiter(" ")
Note: Using { } for transformOperations allows us to specify one formula as the “default Transformation” for all values in all columns and rows
3. Combine all columns into List of Lists
Use the Table.AddColumn operation
When using Table.AddColumn, the underscore _ represents each row in “Record” format
Use Record.ToList formula to combine each list into a List of Lists for each row
4. Use Table.FromColumns function to make table
Takes a List of List for Columns, then a separate list for header names
5. Expand Table and Use FillDown function as needed
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"No", type text}, {"Code", type text}, {"Value", type text}}),
Custom1 = Table.TransformColumns(#"Changed Type",{}, Splitter.SplitTextByDelimiter(" ")),
#"Added Custom" = Table.AddColumn(Custom1, "Custom", each Table.FromColumns(Record.ToList(_),Table.ColumnNames(Source))),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Custom"}),
#"Expanded Custom" = Table.ExpandTableColumn(#"Removed Other Columns", "Custom", {"No", "Code", "Value"}, {"No", "Code", "Value"}),
#"Filled Down" = Table.FillDown(#"Expanded Custom",{"No"}),
#"Added Custom1" = Table.AddColumn(#"Filled Down", "Custom", each 0)
in
#"Added Custom1"
Информация по комментариям в разработке