Andy L.

Andy L. ITM, VUB

Temat: Przekształcenie pojedyńczej kolumny z losowymi komórkami...


Obrazek



let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
TT = Table.Transpose(Source),
TCN = Table.ColumnNames(TT),
TSC = Table.SelectColumns(TT,TCN,MissingField.UseNull),
Merge = Table.CombineColumns(TSC,TCN,Combiner.CombineTextByDelimiter(","),"Value"),
Split2Rows = Table.ExpandListColumn(Table.TransformColumns(Merge, {{"Value", Splitter.SplitTextByDelimiter(",,", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Value"),
SplitCount = Table.AddColumn(Split2Rows, "Split Count", each List.Count(Text.Split([Value],","))),
MaxCount = List.Max(SplitCount[Split Count]),
List = List.Transform({1..MaxCount}, each Text.From(_)),
Split2Cols = Table.SplitColumn(SplitCount,"Value",Splitter.SplitTextByDelimiter(","), List),
RC = Table.RemoveColumns(Split2Cols,{"Split Count"})
in
RC