Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I have a column that has a date column that contains the first date of each month. I want to expand this column to show every date for every month, and duplicate all the rows for each day. I have a Budget that is formated like this: "Month", "Budget per day" and I want to be able to create a chart showing the cumulative total budget for the month.
Solved! Go to Solution.
@crobson29 , Create Date Table in Power query using List.Dates and also add column using Date.StartOfMonth and then merge your table using StartofMonth and FirstDate in your table
Power BI - Get Dates between range using Power Query List.Dates- https://youtu.be/SFEPsKfqIks
https://medium.com/@amitchandak/cheat-sheet-power-query-financial-year-calendar-5ceaacb520f1
Merge Tables (Power Query) : https://youtu.be/zNrmbagO0Oo
Or do it using just date table and Time Intellignece
Power BI Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-...
Hi @crobson29
The solution @amitchandak provided is right, and i want to offer some more information for you to refer to.
You can create a blank query in power query and input the following code to advanced editor.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtE31DdU0lEyNFCK1YGKGIFFjJBEjMEixkCRWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Month = _t, #"Budget per day" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Month", type date}, {"Budget per day", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each List.Dates([Month],Date.DaysInMonth([Month]),#duration(1,0,0,0))),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
#"Expanded Custom"
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share data in a format that can be pasted in an MS Excel file. Show the expected result.
Hi @crobson29
The solution @amitchandak provided is right, and i want to offer some more information for you to refer to.
You can create a blank query in power query and input the following code to advanced editor.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtE31DdU0lEyNFCK1YGKGIFFjJBEjMEixkCRWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Month = _t, #"Budget per day" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Month", type date}, {"Budget per day", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each List.Dates([Month],Date.DaysInMonth([Month]),#duration(1,0,0,0))),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
#"Expanded Custom"
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@crobson29 , Create Date Table in Power query using List.Dates and also add column using Date.StartOfMonth and then merge your table using StartofMonth and FirstDate in your table
Power BI - Get Dates between range using Power Query List.Dates- https://youtu.be/SFEPsKfqIks
https://medium.com/@amitchandak/cheat-sheet-power-query-financial-year-calendar-5ceaacb520f1
Merge Tables (Power Query) : https://youtu.be/zNrmbagO0Oo
Or do it using just date table and Time Intellignece
Power BI Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-...
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |