Skip to main 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 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:   

Money arguments
Argument Description
number

The number to be formatted.

format String describing how the resulting money string is to be formatted.
dec_sep String specifying the decimal number separator.
thou_sep String specifying the thousands number separator.

If the format, dec_sep, and thou_sep arguments are omitted, the currency format set in the operating system is used when formatting each specific part of the output. The operating system settings are automatically included as system variables upon creation of the script, thus making sure that these are consistent throughout the entire application.

These system variables are MoneyFormat, MoneyDecimalSep, and MoneyThousandSep, and map to the format, dec_sep, and thou_sep function arguments respectively.

Examples:  

The examples below assume the following default settings:

  • MoneyFormat setting 1: kr ##0,00, MoneyThousandSep' '
  • MoneyFormat setting 2: $ #,##0.00, MoneyThousandSep','

Example 1:  

Money( A )
where A=35648

Example 1 results
Results Setting 1 Setting 2
String: kr 35 648,00 $ 35,648.00
Number: 35648.00 35648.00

Example 2:  

Money( A, '#,##0 ¥', '.' , ',' )
where A=3564800

Example 2 results
Results Setting 1 Setting 2
String: 3,564,800 ¥ 3,564,800 ¥
Number: 3564800 3564800

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 – please let us know!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com