Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I want to split the datetime columns range into multiple rows as shown below.
ID| punch_Start | punch_End
--------------------------------------------
A | 2019-03-04 23:18:00| 2019-03-04 23:21:00
--------------------------------------------
A | 2019-03-04 23:45:00| 2019-03-05 00:15:00
--------------------------------------------
Required Output-
ID| punch_Start | punch_End
--------------------------------------------
A | 2019-03-04 23:18:00| 2019-03-04 23:21:00
--------------------------------------------
A | 2019-03-04 23:45:00| 2019-03-04 23:59:00
--------------------------------------------
A | 2019-03-04 23:59:00| 2019-03-05 00:00:00
--------------------------------------------
A | 2019-03-05 00:00:00| 2019-03-05 00:15:14
Please let me know how can I achieve this.
Solved! Go to Solution.
Hi @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 ) )
)
Hi @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 ) )
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |