Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello all experts.
I have the data below
1/1/2018 | 24 | 24000 |
I would like to transform it into
Start Date | Amount |
1/1/2018 | 1000 |
2/1/2018 | 1000 |
3/1/2018 | 1000 |
4/1/2018 | 1000 |
5/1/2018 | 1000 |
6/1/2018 | 1000 |
7/1/2018 | 1000 |
8/1/2018 | 1000 |
9/1/2018 | 1000 |
10/1/2018 | 1000 |
11/1/2018 | 1000 |
12/1/2018 | 1000 |
1/1/2019 | 1000 |
2/1/2019 | 1000 |
3/1/2019 | 1000 |
4/1/2019 | 1000 |
5/1/2019 | 1000 |
6/1/2019 | 1000 |
7/1/2019 | 1000 |
8/1/2019 | 1000 |
9/1/2019 | 1000 |
10/1/2019 | 1000 |
11/1/2019 | 1000 |
12/1/2019 | 1000 |
Is there anyway that this can be achieved?
Thanks!
JS
Solved! Go to Solution.
Hi JS,
You can do that like this
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ11DUyMLRQ0lEyMgETBgYGSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type date}, {"Column2", Int64.Type}, {"Column3", Int64.Type}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "List", each List.Range({0..[Column2]},1)), #"Expanded List" = Table.ExpandListColumn(#"Added Custom", "List"), #"Added Custom1" = Table.AddColumn(#"Expanded List", "Custom", each [Column3]/[Column2]), #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Custom.1", each Date.AddMonths([Column1], [List]-1)) in #"Added Custom2"
The Source is just the table I have create to hold the data example
/Erik
Hi JS,
You can do that like this
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ11DUyMLRQ0lEyMgETBgYGSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type date}, {"Column2", Int64.Type}, {"Column3", Int64.Type}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "List", each List.Range({0..[Column2]},1)), #"Expanded List" = Table.ExpandListColumn(#"Added Custom", "List"), #"Added Custom1" = Table.AddColumn(#"Expanded List", "Custom", each [Column3]/[Column2]), #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Custom.1", each Date.AddMonths([Column1], [List]-1)) in #"Added Custom2"
The Source is just the table I have create to hold the data example
/Erik
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
37 | |
31 | |
26 |
User | Count |
---|---|
95 | |
50 | |
43 | |
40 | |
35 |