Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
I have two date/time columns defining Start and End -times. What I need is to get a duration -info based on following schedules:
DaySchedule = 08:00-22:00
NightSchedule=22:00-08:00
so as an example:
StartTime= 1.1.2019 21:30
EndTime= 2.1.2019 03:30
Result should be shown so that I have a duration from those timestamps for daytime and nighttime in own columns - like
DayTime=30 minutes
NightTime= 5h 30 minutes
Is there an easy way to do this?
You may download the file attached and check the steps in Query Editor.
Hi!
That seem to work - almost. Only issue is that I have actually also seconds on my timestamps, so in some cases that causes a negative value as a result to nighttime - as you see on the example below. How to correct that one?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |