The ELSE command designates a conditional action to be performed in an IF statement. All actions placed after the ELSE in an IF statement are performed only if the test in the IF statement generates a value of FALSE.
ELSE statement ; [ ...statement; ] ENDIF;
| statement | Those operations that are to be performed in the event that the IF test including the ELSE command produces a FALSE, or 0, result. |
The following example is based on the Sample Basic database. This calculation script tests to see if the current member in the Market dimension is a descendant of West or East. If so, Analytic Services multiplies the value for Marketing by 1.5. If the current member is not a descendant of West or East, Analytic Services multiplies the value for Marketing by 1.1.
Marketing
(IF (@ISMBR(@DESCENDANTS(West))
OR
(@ISMBR(@DESCENDANTS(East)))
Marketing = Marketing * 1.5;
ELSE
Marketing = Marketing * 1.1;
ENDIF;
| ©2004 Hyperion Solutions Corporation. All Rights Reserved. http://www.hyperion.com |