Siebel Marketing Guide > Creating Measures > Custom Measures >

Building Custom Measure Expressions


When creating custom measures, you can use measures listed in the Available Measures list, the operator buttons, the computer's keypad, and the available mathematical and logical function values to build the expression.

The Available Measures list shows:

Table 35 describes the functions that are available when creating logical custom measure expressions.

Table 35.  Logical Functions
Logical Function
Description
Syntax
IsNegative
Returns 1 if the number is negative or 0 if the number is positive.
IsNegative(number)
IsPositive
Returns 1 if the number is positive or 0 if the number is negative.
IsPositive(number)
IsZero
Returns 1 if the number is zero or 0 if the number is nonzero.
IsZero(number)
NOT
Reverses the value of its argument. Use NOT when you want to verify that a value is not equal to one particular value.
Not(logical)
 

Table 36 describes the functions that are available when creating mathematical custom measure expressions.

Table 36.  Mathematical Functions
Mathematical Function
Description
Syntax
Abs
(Absolute value)
Returns the absolute value of a number. The absolute value of a number is the number without its sign.
ABS(number)
Exp
(Exponential)
Returns e raised to the power of number. The constant e equals 2.71828182845904, the base of the natural logarithm.
Exp(number)
Ln
(Natural log)
Returns the natural logarithm of a number. Natural logarithms are based on the constant e (2.71828182845904).
ln(number)
Random
Returns an evenly distributed random number greater than or equal to 0 and less than 1.
No argument is needed for this function. If a user adds an argument, Random still will generate a random number between 0 and 1.
Random (number)
 
Sign
Determines the sign of a number. Returns 1 if the number is positive, zero (0) if the number is 0, and -1 if the number is negative.
Sign(number)
Sqrt
(Square root)
Returns a positive square root.
Sqrt(number)
 

To add expressions to custom measures

  1. From the application-level menu, choose View > Site Map > Marketing Administration > Measures.
  2. In the All Measures list, select a custom measure.
  3. Click the Custom view tab.
  4. The custom measure's details appear in the form above the expression builder.

  5. In the Available Measures pane, select a measure and click Add to Expression.
  6. NOTE:  To show fields such as measure type and customer hierarchy, click the menu button and choose Columns Displayed.

  7. To use logical or mathematical functions in the expression:
    1. Select the category (Mathematical, Logical, or All).
    2. The elements of each function category appear in the pane at right.

    3. Double-click the function in the elements list.
    4. The function appears in the expression pane at the cursor location.

      Function syntax is detailed in Table 35 and Table 36.

  8. Add numerical values to the expression using the computer's keypad.
  9. The values appear at the cursor location in the expression.

    When typing numbers greater than 999, do not use digit grouping symbols such as commas or periods. For example, do not type 45,386 (comma separating groups) or 45.386 (period separating groups). Instead, type 45386.

  10. To build compound expressions, click the operator buttons and add additional measures and expressions.
  11. Make sure to position the cursor where you want to insert the operator before inserting an item.

    To use parentheses, select the expression to be contained within the parentheses, and then click the open parenthesis button and the close parenthesis button. Use parentheses whenever possible to isolate pairs of values and an operator.

  12. When you have finished building the custom measure expression, click Validate & Save.

To delete all or a portion of the expression

To edit the custom measure from this view


 Siebel Marketing Guide 
 Published: 23 June 2003