| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
percentage availability
percentage availability
I have a problem in crystal report(integrated in visual studio.net) I want to make a chart which show average of percentage availability based on fault party and date of fault. There are three fault party named Singtel, Sat ops and Customer availability= (total minutes in a month- total outage)/total minutes * 100 Currently i can show percentage of availability for each party but then when i am trying to get the average, i cannot get the correct result Below is my formula: if {dummy.outage}>0 then if datepart("m",{dummy.date_origin})=01 or datepart("m",{dummy.date_origin})=03 or datepart("m",{dummy.date_origin})=05 or datepart("m",{dummy.date_origin})=07 or datepart("m",{dummy.date_origin})=08 or datepart("m",{dummy.date_origin})=10 or datepart("m",{dummy.date_origin})=12 then formula = (44640-Sum ({dummy.outage},{dummy.fault_party}))/44640 * 100 else if datepart("m",{dummy.date_origin})=04 or datepart("m",{dummy.date_origin})=06 or datepart("m",{dummy.date_origin})=09 or datepart("m",{dummy.date_origin})=11 then formula = (43200-Sum ({dummy.outage},{dummy.fault_party}))/43200 * 100 else if datepart("m",{dummy.date_origin})=02 then formula = (40320-Sum ({dummy.outage},{dummy.fault_party}))/40320 * 100 end if end if end if Else if {dummy.outage}=0 then formula=100 End if end if what i want is let say for january there are 4 faults. 1 fault caused by Singtel, 1 fault caused by customer and 2 faults caused by sat ops. currently i can show the availability for each party that month(let say for singtel=99.89%, for customer=99.52%, for sat ops= 99.44%), but i can not show the average for that month based on fault party, which is(99.89+99.52+99.44)/3=99.62% i want the chart shows the average of availability for all months in a year. How should i approach this problem? thanks in advance, elizabeth |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|