1 Reply Latest reply on Oct 16, 2013 7:42 AM by . Indumon

    Testing

    Kapil Bolli

      Test

        • 1. Re: How to do a Compliance ratio on a Calculated Field
          . Indumon

          Hi Kapil,

           

          You can accomplish it in different ways, depends on your output requirement.

           

          Option 1. I assume your data source has a start date and end date.

           

          Source data.PNG.png

           

          and looking for an output like this

           

          Output.jpg

          To do's

          Create two calculated fields

          status=IIf (datediff('day',[StartDate],[EndDate])>7 ,'Breached SLA','Within SLA')

          Compliance Ratio= Count([Status])/Total(Sum([Number of Records]))

           

          Option 2 : If you looking for an output like this

          Option2-n.PNG.png

           

          Create 3 calculated fields

           

          Breached SLA Count= Count(If datediff('day',[StartDate],[EndDate])>7 then 'Breached SLA' end)

          Within SLA Count= Count(If datediff('day',[StartDate],[EndDate])<=7 then 'Within SLA' end)

          Compliance ratio=[Within SLA Count]/([Breached SLA Count]+[Within SLA Count])

           

          Hope this will help you..