Number formats

(Redirected from Number Format Dialog)


4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3

Number format controls options such the number of decimal digits, the currency sign, commas to separate thousands, and display of negative numbers. It also controls the format of dates. You can set a format for numbers and dates displayed in an edit table, result table, graph, or field of a user input, or output. The number format of an index applies wherever that index is used, including row or column headers of a table, or graph axis that uses that index. With Analytica 5.0, you can set a number format for each cell, row, column, or other slice of an array.

You can enter a number into an expression or table in any format, no matter what output format it uses.

Number format dialog

To set the number format for a variable:

  1. Select the variable to format by showing its edit table, result table, or graph, or by selecting its node in a diagram. You can apply the same format to multiple variables at once if you select their nodes together in a diagram.
  2. Select Number format from the Result menu, or press Control+b, to show this dialog:
  1. Select the format type you want from the list on the left.
  2. Select options you want, such as Decimal digits, Show trailing zeroes, Thousands separators, or Show currency symbol, from the menus and checkboxes. The options available depend on which format you selected.
  3. View the example at the top of the dialog to see if the format is what you want.
  4. If so, click the Apply button.

You can change the default number format by pressing Set Default. The default format applies to all variables in your model whose number format has not been explicitly set.

When you bring up the Number Format Dialog while viewing a table, pay particular attention to which cells are selected. When you want the format to apply to the entire table, first deselect all cells by clicking in the table header area, or select all cells first. If you have selected a single cell, you may end up changing the number format for a single cell. If a subset of cells are selected, your format will apply to those cells only.

Types of number format

The default number format is suffix, which uses a letter after the number to denote order of magnitude -- for example, 10K means 10,000, where K means Kilo or thousands. Choose one of these number formats:

Format Description Example
Suffix A letter after the number specifies power of ten 12.35K
Exponential Scientific notation, where the number after 'e' gives

the powers of ten

General (new to Analytica 5.0) Floating point number with a specified number of significant digits. Reverts to scientific notation only when a number is extreme, or the non-scientific notation depiction would contain more than the specified number of significant digits. 12345.678
Fixed Point Number with a fixed number of digits after the decimal point 12345.68
Integer A whole number with no decimals shown 12346
Date Show number (days since 1 Jan 1900) as a date and/or time

(see below for format options)

12 Jan 2007
Boolean Display 0 as False, and any other number as True True, False
Hexadecimal (new to Analytica 5.0) Display an integer in base-16 using the digits 0-9 and a-f. The number is prefixed with 0x. When a negative number is displayed, its two's complement is shown. 0x303a
Binary (new to Analytica 5.0) Display an integer in base-2 using the digits 0 and 1. The number is prefixed with 0xb. When the number is negative, its 64-bit two's complement is shown. 0b11000000111010

Suffix number format

Suffix is Analytica’s default number format. It uses a conventional letter after each number to specify powers of 10: 12K means 12,000 (K for kilo or thousands), 2.5M means 2,500,000 (M for Mega or millions), 5n means 0.000,000,005 (n means nano or billionths). Here are the suffix characters:

Power of 10 Suffix Prefix Power of 10 Suffix Prefix
10-2 % percent
103 K Kilo 10-3 m milli
106 M Mega or Million 10-6 μ or u micro (mu)
109 G or B Giga or Billion 10-9 n nano
1012 T Tera or Trillion 10-12 p pico
1015 Q Quadrillion 10-15 f femto
Note the difference between “M” for Mega or Million and “m” for milli (1/1000). This is the only situation in which Analytica cares about the difference between uppercase and lowercase. Otherwise, it is insensitive to case (except when matching text values).
In suffix format, it displays four-digit numbers without the “K” suffix — e.g., 2010, not 2.010K — which works better for years. For suffix, integer, or fixed point formats, it uses exponent format for numbers too large or small — e.g., numbers larger than 109 in integer or fixed point format, or larger than 1018 in suffix format.

Maximum precision: The maximum number of digits including decimal digits is 15 (14 for fixed point and percent). The maximum precision is 15 digits (9 for integers).

Number format options

Decimal digits: The number of digits to show after the decimal point.

Show trailing zeroes: Check to show trailing zeroes in decimals, e.g., 2.100 instead of 2.1, when decimal digits are set to 3.

Thousands separators: Check to show commas between every third digit of the integer part, e.g., 12,345.678, instead of 12345.678.

Display dates as numbers: Displays a date or time data type as a number, where the value is the number of days after the date origin.

Display numbers as dates: Interprets a numeric value as a date, equal to the number of days past the date origin.

Show currency symbol: Check to show a currency symbol. Select the symbol and placement from these menus.

Chapter7 4.png

Placement controls the relative location of the currency symbol, e.g., $200 or 200DM, and whether to use a minus sign -$200 or parentheses ($200) to indicate a negative number.

Regional settings: If you select the last entry, regional, from the Symbol or Placement menu, it uses, respectively, the regional currency or placement settings set for your computer. You can modify these settings in the Regional and Language options available from the Windows Control Panel.

See Also


You are not allowed to post comments.