x
Solved

# crystal group suppression based on formula

Posted on 2015-02-20
Medium Priority
128 Views
CRV10 - I have a report with one group, LOCATION.  In that group footer I have a formula that calculates turnover percentage.  I already have detail suppressed.   How can I suppress the group if the turnover percentage < 10 percent ?

The formula is:
if Sum ({@terms}, {@pl and dept and name}) = 0 then 0 else

Truncate (Sum ({@terms}, {@pl and dept and name})) / Sum ({@headcount EndofMth}, {@pl and dept and name}) * 100
0
Question by:jph826
• 3
• 2

LVL 101

Expert Comment

ID: 40622131
Try this

Click REPORT   -->  SELECTION FORMULA --> GROUP

``````if Sum ({@terms}, {@pl and dept and name}) = 0 then
False
Else
(Truncate (Sum ({@terms}, {@pl and dept and name})) / Sum ({@headcount EndofMth}, {@pl and dept and name}) * 100) >= 10
``````
mlmcc
0

Author Comment

ID: 40622146
Thank you!  I got the "Division by zero" error with the Truncate portion of the formula hi-lighted.
0

LVL 101

Accepted Solution

mlmcc earned 2000 total points
ID: 40622592
``````if Sum ({@terms}, {@pl and dept and name}) = 0  OR  Sum ({@headcount EndofMth}, {@pl and dept and name})  = 0 then
False
Else
(Truncate (Sum ({@terms}, {@pl and dept and name})) / Sum ({@headcount EndofMth}, {@pl and dept and name}) * 100) >= 10
``````

mlmcc
0

Author Comment

ID: 40642989
Exactly what I needed.  Thank you!
0

Author Comment

ID: 40642994
thanks
0

## Featured Post

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.