Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Noddy
New Member

Calculate sum of hours falling within a selected month for transactions spanning multiple months

Greetings of the day to all you brainy folks 🙂
I am a basic user of powerquery, do not have powerBI installed. I could use your help with this issue I am struggling with.


I have a list of transactions (thousands of rows) that have an outage start time and end time, most of them spanning over multiple months.

NumberOutage BeganOutage Ended
INC25361/4/2023 4:015/4/2023 9:01
INC25371/4/2023 4:011/4/2023 9:01
INC25382/8/2023 9:464/15/2023 11:01
INC25393/24/2023 16:355/24/2023 20:28
INC25405/28/2023 16:217/3/2023 17:38
INC25416/4/2023 8:256/4/2023 9:42
INC25426/17/2023 9:256/17/2023 13:00
INC25436/17/2023 9:256/18/2023 11:33
INC25446/17/2023 9:257/18/2023 11:33

 

I need to calculate the count of Incidents and the sum of outage hours that fall within a certain month, say Apr'23. In other words, if I filter my Pivot to Apr'23, it should only give me the count and sum for the Incidents that have some of the time during Apr'23.
Thanks very much in advance

2 REPLIES 2
Noddy
New Member

hello @Ruba , thanks very much for your reply.
Yes, you are correct on count of number but in sum of duration I should get 1861.47569444438 hours

I will try to explain more (sorry, English is not my first language)...
There are 3 Incidents that had days of outage falling during April (INC2536, INC2538 and INC2539).


INC2536 and INC2539 were down for all 30 days of April  (because outage started before April and ended after April) so their outage hours in April should be 750+750....(30*24)
Outage for INC2538 started before April and ended at 4/15/2023 11:01:00 AM so it had 14.45903935 days or 361.4759838 hours of outage time in April
Adding the hours for those 3 Incidents gives us 1861.4759838 hours

rubayatyasmin
Super User
Super User

Do you want something like image below? I am not sure I got your question.

 

rubayatyasmin_0-1691682924339.png

 

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors