Forum Discussion
Anonymous
2 years agoNot applicable
Split Start Date and End Date into Multiple Rows
I can have a simple table like this: Start Date End Date 1/1/2023 4/30/2023 and with the following DAX I can generate a new table with rows between the two dates, on a per day ...
- 2 years ago
Hi Anonymous
Here's what I would recommend.
I've tweaked the code to use GENERATE/CALENDAR to expand the list of dates:
DateSplitTable = VAR ExpandDates = GENERATE ( YourTable, CALENDAR ( YourTable[Start Date], YourTable[End Date] ) ) RETURN SELECTCOLUMNS ( ExpandDates, "Person", YourTable[Person], "SplitDate", [Date] )Does this work for you?
Regards
OwenAuger
2 years agoSuper User
Hi Anonymous
Here's what I would recommend.
I've tweaked the code to use GENERATE/CALENDAR to expand the list of dates:
DateSplitTable =
VAR ExpandDates =
GENERATE (
YourTable,
CALENDAR (
YourTable[Start Date],
YourTable[End Date]
)
)
RETURN
SELECTCOLUMNS (
ExpandDates,
"Person", YourTable[Person],
"SplitDate", [Date]
)
Does this work for you?
Regards