Вы можете добавить пользовательский столбец в вашу таблицу с формулой
List.Repeat( { [col1] }, [col2] )
Это создает столбец со списком в каждой строке, где элементы списка [col1]
перечислены [col2]
количество раз.
Оттуда вы можете развернуть этот список в строки, используя кнопку в таблице.
Вот как выглядит полный код M:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSs0rKao0VNJRMlSK1YFyjYBcIwTXGCIbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [col1 = _t, col2 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"col1", type text}, {"col2", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each List.Repeat({[col1]},[col2])),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
#"Expanded Custom"
Здесь вы можете выбрать col1
или Custom
и удалить другие столбцы, если хотите.