 Former Member

# CR - Getting 0.63 values all through.

For the Column "% of First Call Resolution" I have to calculate it based on the below formula

SUM(CASE WHEN INTERACTION_RESULT = 'FCR' THEN 1 ELSE 0 END) / COUNT(Interaction_ID)

For which, I wrote the below formula

Sum ({If {14CICustomerInteractions_query.Interaction Result} = "FCR" then 1 else 0}) / Count ({14CICustomerInteractions_query.No of Interaction(s)})

But I am getting 0.63 values all through.

Need Solution.

10|10000 characters needed characters exceeded

### Related questions

• Posted on Jan 10, 2012 at 11:38 AM

Hi Upaasana,

in the formula you have given you are returning flag value. ie 1 or 0. That wont added up. Instead of that try the below logic.

COUNT(CASE WHEN INTERACTION_RESULT = 'FCR' ) / COUNT(Interaction_ID).

you can introduce a number variable c like below.

``` numbervar c;
If {14CICustomerInteractions_query.Interaction Result} = "FCR" then
c := c + 1;
```

divide the value c with count of interaction ID. you will get the answer.

modify your formula according to the above logic and try.

hope it helps.

Regards,

Nikhil Joy

10|10000 characters needed characters exceeded
• Former Member
Posted on Jan 10, 2012 at 01:51 PM

Create two formulas

one that does the 1 or 0 ( you can test this at the details level )

then do the calculation sum/count

Edited by: AlunJD on Jan 10, 2012 1:54 PM

10|10000 characters needed characters exceeded
• Jamie Wiseman Former Member

thought i'd take a guess there about the x-tab.

however, if you look at your initial formula, it uses report level summaries...

SUM(CASE WHEN INTERACTION_RESULT = 'FCR' THEN 1 ELSE 0 END) / COUNT(Interaction_ID)

this is going to take the sum across the entire report and the count across the entire report.

what you should look into is group summaries. where do you want this calculation to be evaluated on...i.e. where do you want the number to change...is it on Workgroup?

1) if so, create a group on the Workgroup field or on the field that you wish to have the summary % based on

2) insert a summary on the group level for both the 1 else 0 formula and for the count of ID

3) now create a new formula that does the % on the group level...something like

SUM(CASE WHEN INTERACTION_RESULT = 'FCR' THEN 1 ELSE 0 END, {your group field}) / COUNT(Interaction_ID, {your group field})