Logic Tips

The following tips will help when creating computed item expressions:

  • Item names are not case-sensitive.
  • Type the word null (no quotes) into the expression panel to represent null values.
  • All text string constant values entered in expressions must be enclosed in double quotes.
  • All date constant values entered in expressions must be enclosed in single quotes.
  • Numbers can be entered without quotes.
  • To join items with a space or other character, simply reference or type items and strings into the expression panel and join them with the + operator (for example, City + ‘, ‘ + State). To join without additional characters, use the Concat function.
  • If, then, else logic statements are assembled in natural language form.
    For example:
    if Stu_Cnt_Current >= Stu_Cnt_Freeze then Stu_Cnt_Current else Stu_Cnt_Freeze
    Returns the Stu_Cnt_Current value if that value is greater than or equal to the Stu_Cnt_Freeze value, otherwise it returns the Stu_Cnt_Freeze value.
  • Computed items with expressions that yield mixed data type values (for example, if Score > 50 then Score else ‘Fail’) default to Char (String) data type.
  • In division operations, the divisor may not be null or equal to zero. If a data item serves as the divisor in an expression (for example, 5000 / Units_Sold) and includes null or zero values, first create a computed item using if/then/else logic to remove null and zero values, and then compute the item containing the division operation.
  • Two date items may be subtracted, but not added. The Add Month function adds an integer value to a date.
  • You may not nest functions inside the Sum, Cume, Chr, and Breaksum functions.

Last updated: October 15, 2013

Last updated: October 15, 2013