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

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.

Reply
Anonymous
Not applicable

Time Intelegence question

I need help with an Availability report and am stuck in one area

"How to create the number of minutes in a given month, as this changes dependant on if 28, 29 (leap year) 30 or 31 days in the month." i need to be able to filter by year and month

Once i can create this, the monthly minutes I will deduct any outage time (create date - restore date)

Final outcome will be the percentage uptime in any given month i.e.

Sept 2022 = 43,200 mins - 125 mins (outage time) = 43,075 mins 0r 99.71% Up-Time

I would appreciate any help possible on the first step only

Kind Regards

Gary Gray

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Mangaus,

 

Thaank you for quick reply, looks good except Feb 2022 (Leap year 29 days)

View solution in original post

8 REPLIES 8
mangaus1111
Solution Sage
Solution Sage

Hi @Anonymous ,

see my pbi file

https://1drv.ms/u/s!Aj45jbu0mDVJiy2W2aAsl9ZKOgFG?e=3wJegv

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Mangaus,

 

Thaank you for quick reply, looks good except Feb 2022 (Leap year 29 days)

Anonymous
Not applicable

Mangaus,

 

Sorry it was Feb 2020 🙂

 

Thanks for help 

 

Gary

@Anonymous EOMONTH should take care of that. See my previous reply.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Greg,

 

Using your code, every month is 1 hour out 😞

 

Gary

Thennarasu_R
Responsive Resident
Responsive Resident

Exact Answer I don't Know 

Try with these Dax functions Minute,Hour

Greg_Deckler
Super User
Super User

@Anonymous You could do something like this:

Minutes in Month =
  VAR __Date = MAX('Dates'[Date])
  VAR __FirstOfMonth = DATE(YEAR(__Date),MONTH(__Date),1)
  VAR __EndOfMonth = EOMONTH(__Date,0) + 1/24/60 * 1439
RETURN
  DATEDIFF(__FirstOfMonth, __EndOfMonth, MINUTE)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Greg,

 

Thanks for such a quick response, works well Except one hour out each month (see yellow column)

 

Capture.JPG

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors