私のテーブルは次のようになります。
私はそれを次のようにしたい:
私はそれをしました:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUfL0s/b0sQ4NBjIDnK1DEpNyUkusAzLy81KBIkZAbKwUqxMNZoUGW3v6AWk0RaZghbGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, market = _t, device = _t, userCount = _t, Num = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"market", type text}, {"device", type text}, {"userCount", Int64.Type}}), #"Transposed Table" = Table.Transpose(#"Changed Type"), #"Split Column by Delimiter" = Table.SplitColumn(Table.TransformColumnTypes(#"Transposed Table", {{"Column1", type text}}, "en-US"),"Column1",Splitter.SplitTextByDelimiter(";", QuoteStyle.Csv),{"Column1.1", "Column1.2", "Column1.3"}), #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Column1.1", type text}, {"Column1.2", type text}, {"Column1.3", type text}}), #"Split Column by Delimiter1" = Table.SplitColumn(Table.TransformColumnTypes(#"Changed Type1", {{"Column2", type text}}, "en-US"),"Column2",Splitter.SplitTextByDelimiter(";", QuoteStyle.Csv),{"Column2.1", "Column2.2"}), #"Changed Type2" = Table.TransformColumnTypes(#"Split Column by Delimiter1",{{"Column2.1", type text}, {"Column2.2", type text}}), #"Transposed Table1" = Table.Transpose(#"Changed Type2"), #"Filled Down" = Table.FillDown(#"Transposed Table1",{"Column3", "Column4", "Column5", "Column1"}), #"Changed Type3" = Table.TransformColumnTypes(#"Filled Down",{{"Column4", Int64.Type}, {"Column5", Int64.Type}}), #"Renamed Columns" = Table.RenameColumns(#"Changed Type3",{{"Column1", "ID"}, {"Column2", "Market"}, {"Column3", "Device"}, {"Column4", "UserCount"}, {"Column5", "Num"}}) in #"Renamed Columns"
各値の順序をセミコロンで保存して、複数の列を分割したかったのです。
USERCOUNT of IN and PC is 2
USERCOUNT of Us and Tablet is 5
USERCOUNT US and PC is blank
このコードは、2 行が 2 列に転置されている場合は簡単ですが、行数がわからない場合はどうすればよいでしょうか?
各列で関数を実行するループを作成したい (最初の転置後)。