Forum Discussion

cj0720's avatar
cj0720
Regular Visitor
5 years ago
Solved

Default Uptime Display Based on Outage Data

Hi all,

 

I am trying to create a column graph that displays the uptime % for various IT applications. Currently, my graph uses a measure which calculates the uptime % by taking the ratio of minutes of downtime to total minutes per month. The report pulls in data from reported outages. The problem is that any application which has had no outages reported will not be displayed on the report, because the data is only based on outage reports. I'd like to display 100% uptime on the column graph for the applications which have not had any outages.

 

Can this be visualized in Power BI with the data I have? Or would I have to create a a new 'baseline' data set to represent the default 100% uptime?

 

Thank you!

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi cj0720 ,

    I created a sample pbix file for you, please check whether that is what you want. 

    1. Create a date dimension table

    2. Create a measure as below

     

    Uptime % = 
    var _workhours=8 //The normal working time of the day when the application does not malfunction
    var _downhours=CALCULATE(SUM('Table'[Downtime]),FILTER('Table','Table'[Date]=SELECTEDVALUE('Date'[Date])))
    return if(ISBLANK(_downhours),1,DIVIDE(_workhours-_downhours,_workhours))

     

    3. Drag the date of Date table onto the column graph as X axis and Measure as Values field

    If the above one is not applicable for your scenario, please provide some sample data in your model (exclude sensitive data)and your expected result with calculation logic. Thank you.

    Best Regards
    Community Support Team _ Rena Ruan
    If this post helps, then please consider Accept it as the solution to help the other members find it more.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi cj0720 ,

    I created a sample pbix file for you, please check whether that is what you want. 

    1. Create a date dimension table

    2. Create a measure as below

     

    Uptime % = 
    var _workhours=8 //The normal working time of the day when the application does not malfunction
    var _downhours=CALCULATE(SUM('Table'[Downtime]),FILTER('Table','Table'[Date]=SELECTEDVALUE('Date'[Date])))
    return if(ISBLANK(_downhours),1,DIVIDE(_workhours-_downhours,_workhours))

     

    3. Drag the date of Date table onto the column graph as X axis and Measure as Values field

    If the above one is not applicable for your scenario, please provide some sample data in your model (exclude sensitive data)and your expected result with calculation logic. Thank you.

    Best Regards
    Community Support Team _ Rena Ruan
    If this post helps, then please consider Accept it as the solution to help the other members find it more.

    • cj0720's avatar
      cj0720
      Regular Visitor

      Excellent and simple solution. Creating a separate table containing all dates is exactly what I needed to do. Thank you!