3 Replies Latest reply on Jun 6, 2012 8:23 AM by Tracy Rodgers

Percent calculation from a group

I have divided some service data into "Other" and "Non-Other" by Employee Position using the following calculation:

if [Problem Type] = 'Other' or [Problem Type] ='Other: Capture details in case notes' or ISNULL([Problem Type]) then 'Other'  else 'Non-Other' end

The result is below.

Agent 1         Other           6,341

Non-Other     32,014

Specialist     Other            1,059

Non-Other     3,350

What I can't figure out is how to now divide the "Other" value by the "Non-Other" value to get a percentage.  I know this should be terribly easy, but I can't seem to figure it out.

Allison

• 1. Re: Percent calculation from a group

Hi Allison,

This can be done by creating a calculation similar to the following:

lookup(sum([Order Quantity]), first())/lookup(sum([Order Quantity]), first()+1)

Place the calculation on the view. Then, right click on it and select Compute Using-->Pane (Down).

Hope this helps!

-Tracy

• 2. Re: Percent calculation from a group

Unfortunately that is not working.  It is giving me a bunch of 0's and 1's.

It should be as simple as

countd([Problem Type] = 'Other') / countd ([Problem Type] = 'Non-Other') but that just gives me 1's.

I'm so confused . . .

• 3. Re: Percent calculation from a group

Hi Allison,

My guess is that you need to change the number format of the calculation so that it shows up as a decimal or percentage. Right click on the calculation in the data box and select Field Properties-->Number Format-->Percentage. Hopefully this will give you the desired results!

-Tracy

1 of 1 people found this helpful