Forum Discussion
Creating Date Schedules using M
Hi
suppose i have a table with 3 fields - ID, StartDate, EndDate
suppose 1 | 1/4/2017 | 4/15/2017
Is there a way to use that to create monthly row data for each month in the time frame? would be great if start/end align so something like this:
ID | Date
1 | 1/4/2017
1 | 2/28/2017
1 | 3/31/2017
1 | 4/15/2017
Review the function by ImkeF at https://www.thebiccountant.com/2017/12/11/date-datesbetween-retrieve-dates-between-2-dates-power-bi-power-query/. Possibly this is the solution you need.
4 Replies
- AnonymousNot applicable
I would try using the Unpivot function. You'll find it in the transform tab of the ribbon menu.
- dt_mcFrequent Visitor
but would unpivot be able to create the rows for the months between start and end dates? wouldn't that only create two rows (start end)
- ChrisMendozaResident Rockstar
Review the function by ImkeF at https://www.thebiccountant.com/2017/12/11/date-datesbetween-retrieve-dates-between-2-dates-power-bi-power-query/. Possibly this is the solution you need.