# Success Rate %

Options
Member

To work out the success rate I need to (a) count number of rows where 'Status' column has 'Application Granted' and divide this by (b) count number of rows where there is a value in 'Determination Date' column.

A / B = Success rate

Any help would be much appreciated, cheers

Tagged:

• Coach
Options

```(count(case when `Status` in ('Application Consented','Application Refused','Waiting for Decision') then `Status` end)
+ count(`Appeal Determination Date`))
/ count(case when `Status` in ('Application Consented','Appeal Allowed'))
```

• Coach
Options

Hi @louiswatson try this:

```count(case when `Status` = 'Application Granted' then `Status` end)/count(`Determination Date`)
```
• Member
Options

Thankyou Michelle, this worked!

As a slightly more advanced calculation, how would I do the below calc?

1. Count how many applications have a status of 'Application Consented', 'Application Refused', 'waiting for decision'
2. Count number of rows where there is an appeal determination date
3. Add together 1 and 2
4. Count number of applications with a status of 'Application Consented' or 'appeal allowed'
5. Divide step 4 by step 3

• Coach
Options

```(count(case when `Status` in ('Application Consented','Application Refused','Waiting for Decision') then `Status` end)
+ count(`Appeal Determination Date`))
/ count(case when `Status` in ('Application Consented','Appeal Allowed'))
```
• Member
Options

I seem to be getting a syntax error, there was a bracket that looked like it didn't need to be there. Any ideas?

count(case when `Status` in ('Application Consented','Application Refused','Waiting for Decision') then `Status` end)

+ count(`Appeal Determination Date`)

/ count(case when `Status` in ('Application Consented','Appeal Allowed'))

• Coach
Options

@louiswatson Apologies, I forgot to complete the last case statement:

count(case when `Status` in ('Application Consented','Appeal Allowed') then `Status` end)

• Member
Options