# Crystal If Statement Help

I need a formula to do the following:

Review a field called Per Diff (which is the difference between two values)

If 0% Display "Perfect"

If it is between  -.10%  and  10%  Display "Good"

If between -25%  and -11% "Fair"

If between 11% and 25% "Fair"

else

Crystal Reports

Last Comment
Mike McCracken
JayConverse

THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
Mike McCracken

THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
evend

This works if they are all positive percentages.  The return for the Per Diff % amount can be a negative .08% or a postive .08%?  Basically it is howing you a percentage over or short for a pick for our fullfillment process.
JayConverse

Abs() means absolute value, so the sign doesn't matter.
evend

I only get results that come up as Perfect or Bad?

This is the formula for the PerDiff Field.  Could it have to do with it?

if Average ({Vend_Visit_Items.par}, {Vend_Visit_Items.description}) = 0 then
0
else

{@Est Diff}/Average ({Vend_Visit_Items.par}, {Vend_Visit_Items.description})
JayConverse

What are the actual values of PerDiff?
Agree.  Sounds like the PerDiff field isn't between 0 and 1

mlmcc
evend

They can be either positive or negative values

Examples

-0.13
-1.25
0.25
0.12
-0.38
If you  put the PerDiff formula on the report what values do you see?

mlmcc
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Crystal Reports

Crystal Reports is a business intelligence application from SAP SE. It is used to graphically design data connections and report layouts from a wide range of data sources including Excel spreadsheets, Oracle, SQL Server databases and Access databases, BusinessObjects Enterprise business views, and local file-system information. Report designers can place fields from these sources on the report design surface, and can also deploy them in custom formulas (using either BASIC or Crystal's own syntax), which are then placed on the design surface. Crystal Reports also supports subreports, graphing, and a limited amount of GIS functionality.

36K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts

TRUSTED BY