Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Easiest way to create a new column that consists of the text from column A repeated the number of times designated in column B?
@mhunt -
The solution at https://www.mrexcel.com/forum/power-bi/977045-pq-repeat-rows-n-times.html seems to fit your need?
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtRzUdJRMlaK1YlWstBzBLJNlWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Category = _t, Contents = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Category", type text}, {"Contents", Int64.Type}}), Custom1 = Table.TransformColumns(#"Changed Type",{"Contents", each List.Numbers(_,_,0), type list}), Custom2 = Table.ExpandListColumn(Custom1,"Contents") in Custom2
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |