Technical data
Creating Rules, Formul as, and User Functions Chapter 10
Comparison Operators
You can compare
the values of two expressions using one of PeopleSoft Analytic Calculation Engine’s
comparison op
erators.
A comparison returns either a True value (1) or a False value (0), depending on the values of the two
expressions.
Note. The analytic calculation engine always interprets a nonzero value as True and a zero value as False.
The expression
s in a comparison can contain mathematical operators, parentheses, and functions, as well as data
cubes and numb
ers. The analytic calculation engine evaluates the expressions on both sides of the comparison
operator befo
re it evaluates the truth of the comparison. Following are some examples of comparisons:
ADVERTISING >
= 10000
ADVERTISING + PROMOTION < 0.5 * (MARKETING_EXPENSE - MARKETING_SALARIES)
The following
table describes PeopleSoft Analytic Calculation Engine’s comparison operators:
Comparison
Operator
Example of Comparison Meaning of Comparison
=
A=B
AisequaltoB.
<>
A<>B
AisnotequaltoB.
>
A>B
A is greater than B.
<
A<B
AislessthanB.
>=
A>=B
A is greater than or equal to B.
<=
A<=B
AislessthanorequaltoB.
Truth Functions
A truth function is a function that returns 1 (True) or 0 (False), depending on whether the arguments of the
function satisfy a condition. The analytic calculation engine uses truth functions to evaluate conditions that are
too complex to express easily with comparison operators.
F
or example:
I
F(FIRST(MONTH), 0, SET(&RunningTotal , &RunningTotal + THISCUBE())
In this example, if the current month that is calculated is the first month, the function returns 0. If the current
month that is calculated is not the first month, the function returns the running total.
See C
hapter 11, “Using Built-in Functions in Analytic Models,” FIRST, page 155 and Chapte r 11, “Using
Built-in Fu nctions in Analytic Models,” MATCH, page 169.
122 Copyright © 1988-2007, Oracl e. All rights reserved.