I want to calculate the SLA percentage

Hi Team,

I have created one formula to find the SLA miss cases but I stuck to calculate the SLA percentage based on folder.
Formula: ifelse(isNull({Cycle days}),‘Open SIMs’,
(Severity=5 OR isNull(Severity)) AND {Cycle days}<=12,‘Within SLA’,
Severity=4 AND {Cycle days}<=12,‘Within SLA’,
Severity=3 AND {Cycle days}<=12,‘Within SLA’,‘SLA exceed’
)

Attaching the dashboard visual

I want to calculate the SLA percentage as below

1 Like

Hi Team,

Any updates?

1 Like

Hello @hripraa, how are you wanting to calculate the SLA percent value? What would it be taking a percent of? Would it be number of SLAs exceeded divided by the number of total SLAs? If that is the case, and if you are utilizing it in a pivot table, you should be able to do something like this:

sum(ifelse({SLA} = 'SLA exceed', 1, 0)/count({SLA})

Since your data is being partitioned within your pivot table, you shouldn’t need to add any further granularity to the aggregation. Let me know if this helps!

Hi @DylanM ,

Did I need to replace the {SLA} with my “SLA duration” formula?

1 Like

Hello @hripraa, yes, you would want to utilize the above formula, I just wasn’t sure what name you gave it in the analysis.

Hello @hripraa, did the formula I provided help guide you towards your expected result? If so, please mark my response as the solution or let me know if you have further questions. Thank you!

Hi @DylanM ,

Facing below error

sum(ifelse({CRB SLA Duration}) = ‘SLA exceed’, 1, 0)/count({CRB SLA Duration})

The calculated field expression sum(ifelse({CRB SLA Duration}) = 'SLA exceed', 1, 0)/count({CRB SLA Duration}) is incorrect. Correct the syntax and choose Create again.

CRB SLA Duration formula:
ifelse(isNull({Cycle days}),‘Open SIMs’,
(Severity=5 OR isNull(Severity)) AND {Cycle days}<=10,‘Within SLA’,
Severity=4 AND {Cycle days}<=8,‘Within SLA’,
Severity=3 AND {Cycle days}<=5,‘Within SLA’,‘SLA exceed’
)

1 Like

Hello @hripraa, you are receiving this error because you are closing the nested ifelse statement early. It should look like this:
sum(ifelse({CRB SLA Duration} = 'SLA exceed', 1, 0))/count({CRB SLA Duration})

That should resolve the error!