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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to calculate monthly uptime percentage from downtime minutes

Hello PowerBI community,

 

How do I calculate the uptime % per month with the data available below ? Can you please help me think through the DAX here? 

 

What I have 

S.NoDowntime Start DateDowntime MinutesDowntime End Date
11/1/2022504002/5/2022
21/2/2022460802/3/2022
31/3/20221022403/15/2022
41/4/2022288001/24/2022
51/5/2022792003/1/2022
61/6/2022806403/3/2022
71/7/20221108803/25/2022
81/8/2022504002/12/2022

 

What I want to calculate - 

 

S.NoJan (uptime%)Feb (Uptime%)Mar (Uptime %)
1082100
2389100
36052
410100100
513097
616090
719019
82357100

 

Thanks in advance!

@amitchandak @Greg_Deckler  @Jihwan_Kim @lbendlin 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please chech the below picture and the attached pbix file.

 

Jihwan_Kim_1-1669867786171.png

 

Jihwan_Kim_0-1669867747389.png

 

 

Uptime percentage measure: =
VAR _daysinamonth =
    COUNTROWS ( 'Calendar' )
VAR _downstreamdaysinamonth =
    COUNTROWS (
        FILTER (
            'Calendar',
            'Calendar'[Date] >= MAX ( Data[Downtime Start Date] )
                && 'Calendar'[Date] <= MAX ( Data[Downtime End Date] )
        )
    )
VAR _upstreamratio =
    DIVIDE ( _daysinamonth - _downstreamdaysinamonth, _daysinamonth )
RETURN
    IF ( HASONEVALUE ( Data[S.No] ), _upstreamratio )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please chech the below picture and the attached pbix file.

 

Jihwan_Kim_1-1669867786171.png

 

Jihwan_Kim_0-1669867747389.png

 

 

Uptime percentage measure: =
VAR _daysinamonth =
    COUNTROWS ( 'Calendar' )
VAR _downstreamdaysinamonth =
    COUNTROWS (
        FILTER (
            'Calendar',
            'Calendar'[Date] >= MAX ( Data[Downtime Start Date] )
                && 'Calendar'[Date] <= MAX ( Data[Downtime End Date] )
        )
    )
VAR _upstreamratio =
    DIVIDE ( _daysinamonth - _downstreamdaysinamonth, _daysinamonth )
RETURN
    IF ( HASONEVALUE ( Data[S.No] ), _upstreamratio )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.