Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

Money - script and chart function

Money() formats an expression numerically as a money value, in the format set in the system variables set in the data load script, or in the operating system, unless a format string is supplied, and optional decimal and thousands separators.

Syntax:  

Money(number[, format[, dec_sep[, thou_sep]]])

Return data type: dual

Arguments
Argument Description
number

The number to be formatted.

format String describing how the resulting money string is to be formatted. If omitted, the value set in the data load script for MoneyFormat is used.

The Money function supports many format options for different date structures, for example:

$#,##0.00: Adds a dollar sign and two decimal places.

€ #,##0: Adds a euro sign and no decimal places, with a space after the euro sign.

​¥#,##0: Adds a Japanese yen sign with no decimal places.

$#,##0;($#,##0): Formats negative values in parentheses.

₣ #.##0,00:​ Adds a Swiss franc sign with periods as thousand separators and a comma for decimals (for example, ₣ 1.000,00).

R #,##0.00: South African rand sign with two decimal places and space after the rand sign.

$ #,##0.000: Adds three decimal places to the dollar format.

dec_sep String specifying the decimal number separator. If omitted, the MoneyDecimalSep value set in the data load script is used.

The Money function supports many decimal number separator formats, for example:

Comma ​' , ': For example, $1,000,00 for one thousand dollars.

Period ' . ':​ For example, € 1,000.00.

Hyphen ' - ': When used instead of the traditional period or comma for the decimal separator, it shows values like ¥1,000-00.

thou_sep String specifying the thousands number separator. If omitted, the MoneyThousandSep value set in the data load script is used.

The Money function supports many options for the thousands number separator:

Period ​' . ': Uses a period for the thousands separator (common in some European formats), displaying as $1.000,00 if combined with a comma decimal separator.

Space ​' ': Uses a space for the thousands separator, which is common in some European countries. Displays as € 1 000.00.

Underscore ​'_':​ Uses an underscore for the thousands separator, which is sometimes used in technical or specific regional formats. Displays values like $1_000.00.

If arguments 2-4 are omitted, the currency format set in the operating system is used.

Example: Chart expressions
Example Results
Money( 35648 )

Returns kr 35 648,00 when the MoneyFormat setting is kr ##0,00 and the MoneyThousandSep is a period ' ' .

Money( 35648, '#,##0 ¥', '.' , ',' )

Returns 3,564,800 ¥ by ignoring the MoneyFormat setting and the MoneyThousandSep setting since the optional parameters Format, dec_sep and thou_sep are supplied in the function.

Money(35648) Returns $ 35,648.00 when the MoneyFormat setting is $ #,##0.00 and the MoneyThousandSep is a comma ','.

Example - Money fundamentals

Example - Money fundamentals using a different format setting

Example - Money scenario

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!