- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Splitting time duration between over months
Hi
I'm still a novice when it comes to writing DAX queries so I'm hoping this is an easy resolve for someone with more experience.
I have a table that is used to show the % uptime of a service over a time period (monthly) as part of a wider dashboard.
I've been using the outage duration column to calculate the % uptime for a certain date period. The time period is usually 1st of the month to last day of the month
This is fine until the outage spans overs 2 months
Index | Service Name | Outage start GMT | Outage end GMT | Outage.Days | Outage.Hours | Outage.Minutes | Outage duration (mins) |
1 | Remote Access - VPN | 28/02/2025 00:00 | 05/03/2025 00:00 | 5 | 0 | 0 | 7200 |
2 | Remote Access - VPN | 29/07/2023 08:30 | 03/08/2023 10:15 | 4 | 1 | 45 | 10185 |
3 | Remote Access - VPN | 10/06/2021 08:30 | 10/06/2021 10:30 | 0 | 2 | 0 | 120 |
4 | Remote Access - VPN | 08/06/2021 18:00 | 08/06/2021 19:30 | 0 | 1 | 30 | 90 |
5 | Remote Access - VPN | 10/03/2020 05:00 | 11/03/2020 06:00 | 1 | 1 | 0 | 1500 |
So in the table above, the first 2 outages span over several days as well as overlapping months.
How would I split the outage duration to show the correct minutes for each day?
For Index 1, there should be 1440 mins for each day
For Index 2, there should be 930 mins for 29/07 then 1440 mins for all other days then 615 mins for 03/08
Ideally, I'd like to split the whole row to show something similar to this (Index 2 as the example), where it shows the outage duration for each day of that index...
Index | Service Name | Outage start GMT | Outage end GMT | Outage.Days | Outage.Hours | Outage.Minutes | Outage duration (mins) |
2 | Remote Access - VPN | 29/07/2023 08:30 | 30/07/2023 00:00 | 0 | 15 | 30 | 930 |
2 | Remote Access - VPN | 30/07/2023 00:00 | 31/07/2023 00:00 | 1 | 0 | 0 | 1440 |
2 | Remote Access - VPN | 31/07/2023 00:00 | 01/08/2023 00:00 | 1 | 0 | 0 | 1440 |
2 | Remote Access - VPN | 01/08/2023 00:00 | 02/08/2023 00:00 | 1 | 0 | 0 | 1440 |
2 | Remote Access - VPN | 02/08/2023 00:00 | 03/08/2023 10:15 | 0 | 10 | 15 | 615 |
Hope that makes sense
Any help is very much appreciated
Kind regards
Imran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@IAShakir Ensure you have a date table in your model. If not, create one.
Use DAX to create a calculated table that splits the outage duration into daily segments.
dax
OutageDailyBreakdown =
VAR OutageTable = 'YourOutageTable'
VAR DateTable = 'YourDateTable'
RETURN
ADDCOLUMNS(
FILTER(
CROSSJOIN(OutageTable, DateTable),
DateTable[Date] >= OutageTable[Outage start GMT] &&
DateTable[Date] <= OutageTable[Outage end GMT]
),
"DailyOutageStart",
IF(DateTable[Date] = OutageTable[Outage start GMT], OutageTable[Outage start GMT], DateTable[Date]),
"DailyOutageEnd",
IF(DateTable[Date] = OutageTable[Outage end GMT], OutageTable[Outage end GMT], DateTable[Date] + 1),
"DailyOutageMinutes",
DATEDIFF(
IF(DateTable[Date] = OutageTable[Outage start GMT], OutageTable[Outage start GMT], DateTable[Date]),
IF(DateTable[Date] = OutageTable[Outage end GMT], OutageTable[Outage end GMT], DateTable[Date] + 1),
MINUTE
)
)
Proud to be a Super User! |
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@bhanu_gautam Thank you for getting back to me so quickly
Service Name | Outage start GMT | Outage end GMT | Outage.Days | Outage.Hours | Outage.Minutes | Outage duration (mins) | Date | DailyOutageStart | DailyOutageEnd | DailyOutageMinutes |
Network LAN & Wireless | 02/08/2024 17:53 | 05/08/2024 15:38 | 2 | 21 | 45 | 4185 | 05/08/2024 00:00 | 05/08/2024 00:00 | 06/08/2024 00:00 | 1440 |
Network LAN & Wireless | 02/08/2024 17:53 | 05/08/2024 15:38 | 2 | 21 | 45 | 4185 | 04/08/2024 00:00 | 04/08/2024 00:00 | 05/08/2024 00:00 | 1440 |
Network LAN & Wireless | 02/08/2024 17:53 | 05/08/2024 15:38 | 2 | 21 | 45 | 4185 | 03/08/2024 00:00 | 03/08/2024 00:00 | 04/08/2024 00:00 | 1440 |
SERVICEREQID | Service Name | Outage start GMT | Outage end GMT | Outage.Days | Outage.Hours | Outage.Minutes | Outage duration (mins) | Date | DailyOutageStart | DailyOutageEnd | DailyOutageMinutes |
IT205901 | Remote Access - VPN | 28/02/2025 00:00 | 05/03/2025 00:00 | 5 | 0 | 0 | 7200 | 05/03/2025 00:00 | 05/03/2025 00:00 | 05/03/2025 00:00 | 0 |
IT205901 | Remote Access - VPN | 28/02/2025 00:00 | 05/03/2025 00:00 | 5 | 0 | 0 | 7200 | 04/03/2025 00:00 | 04/03/2025 00:00 | 05/03/2025 00:00 | 1440 |
IT205901 | Remote Access - VPN | 28/02/2025 00:00 | 05/03/2025 00:00 | 5 | 0 | 0 | 7200 | 03/03/2025 00:00 | 03/03/2025 00:00 | 04/03/2025 00:00 | 1440 |
IT205901 | Remote Access - VPN | 28/02/2025 00:00 | 05/03/2025 00:00 | 5 | 0 | 0 | 7200 | 02/03/2025 00:00 | 02/03/2025 00:00 | 03/03/2025 00:00 | 1440 |
IT205901 | Remote Access - VPN | 28/02/2025 00:00 | 05/03/2025 00:00 | 5 | 0 | 0 | 7200 | 01/03/2025 00:00 | 01/03/2025 00:00 | 02/03/2025 00:00 | 1440 |
IT205901 | Remote Access - VPN | 28/02/2025 00:00 | 05/03/2025 00:00 | 5 | 0 | 0 | 7200 | 28/02/2025 00:00 | 28/02/2025 00:00 | 01/03/2025 00:00 | 1440 |
Apologies if I wasn't clear
Thanks in advance
Kind regards
Imran

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
07-12-2024 01:30 PM | |||
04-08-2024 10:33 PM | |||
11-14-2023 01:39 PM | |||
02-14-2024 04:28 AM | |||
12-05-2024 06:24 AM |
User | Count |
---|---|
86 | |
81 | |
53 | |
39 | |
37 |