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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
walterdp
Helper I
Helper I

How to calculate % availability

Hi all:

 

I need to measure availability (uptime) of systems and countries. Results change based on filters (time span, system selected, etc). I have the numerator: the sum of hours of downtime based on the tickets with "Critical" priority

OPENEDCLOSEDTIME TO RESTORE
1/1/20231/3/202348
1/1/20231/5/2023120

 

I have problems with denominator because it should change based on the time period selected 

For instance

TOTAL DOWNTIME MONTHTOTAL MONTH HOURSUPTIME (1 - (DOWNTIME / PERIOD EVALUATED, in this case, JAN)
168Jan74477%
    

 

Any ideas?


Thanks!

 

W.

5 REPLIES 5
walterdp
Helper I
Helper I

Hi Marcel:

 

Did you have the chance of reviewing the dummy file?


Thanks

marcelsmaglhaes
Super User
Super User

Hey @walterdp !

If in your visual you have the month, maybe you can create a measure using ALLSELECTED function. 

MY_MEASURE =
CALCULATE (
1 - DIVIDE ( [TOTALDOWNTIME], [TOTALMONTH], 0 ),
ALLSELECTED ( 'TABLE'[MONTH] )
)

Let me know if it helps.

Regards,
Marcel


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



Hi @marcelsmaglhaes 

Thanks for replying. Not sure if I was clear enough when explaining the problem. 

What I need to do is to calculate availability with number of hours of downtime in a given period of time divided by total number of hours in the same given period of time. That period should be flexible (filtered by a visual object)

 

I've tried something similar to what you've mentioned, but I believe I'm not doing it well.

Here's the formula

 

Disponibilidad 3 = CALCULATE (1 - DIVIDE(SUM('Incs Cerrados'[Time to Restore]) --Sum of all downtime
,DATEDIFF(MIN('Calendario'[Date]),MAX('Calendario'[Date]),HOUR),1)) -- Calendario is a date table.

 

 

Here are the results

  • Creada (Start Date) is the field in "Inc Cerrados" table that's used as the filter to define the period of time mentioned before
  • Total Tiempo is the denominator of the division mentioned above (DATEDIFF(MIN('Calendario'[Date]),MAX('Calendario'[Date]),HOUR),1))) This field should change when modifying filters

 

walterdp_0-1675080721892.png

 

 

 

walterdp_1-1675080721940.png

 

 

 

 

 

Hey @walterdp !

Sorry for delay. Have you solved it yet? If no, you can share the pbix?

Regards,
Marcel


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors