Forum Discussion
Vatz8
Helper I
3 years agoSplit Datetime range columns into multiple rows for each day.
Hi, I want to split the datetime columns range into multiple rows as shown below. ID| punch_Start | punch_End -------------------------------------------- A | 2019-03-0...
- 3 years ago
Hi Vatz8
Please refer to attached sample file with the proposed solutionTable 2 = SELECTCOLUMNS ( GENERATE ( 'Table', CALENDAR ( 'Table'[punch_Start], 'Table'[punch_End] ) ), "ID", [ID], "Punch_Start", MAX ( [punch_Start], [Date] ), "Punch_End", MIN ( [punch_End], [Date] + TIME ( 23, 59, 0 ) ) )
tamerj1
Community Champion
3 years agoHi Vatz8
Please refer to attached sample file with the proposed solution
Table 2 =
SELECTCOLUMNS (
GENERATE (
'Table',
CALENDAR ( 'Table'[punch_Start], 'Table'[punch_End] )
),
"ID", [ID],
"Punch_Start", MAX ( [punch_Start], [Date] ),
"Punch_End", MIN ( [punch_End], [Date] + TIME ( 23, 59, 0 ) )
)