# Money# - script and chart function

Money#() converts a text string to a money value, in the format set in the load script or the operating system, unless a format string is supplied. Custom decimal and thousand separator symbols are optional parameters.

Syntax:

Money#(text[, format[, dec\_sep [, thou\_sep ] ] ])

Return data type: dual

Arguments:

Arguments

| Argument | Description |
| --- | --- |
| text | The text string to be evaluated. |
| format | String describing the expected input format to use when converting the string to a numeric interval.<br><br>If omitted, the money format set in the operating system<br>is used. |
| dec\_sep | String specifying the decimal number separator. If omitted, the `MoneyDecimalSep` value set in the data load script is used. |
| thou\_sep | String specifying the thousands number separator. If omitted, the `MoneyThousandSep` value set in the data load script is used. |

The `Money#` function generally behaves like the `Num#` function but takes its default values for the decimal and thousand separators from the script variables for money format or the system settings for currency.

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/InterpretationFunctions/money_hash.htm)

#### Examples and results:

The examples below assume the two following operating system settings:

* Money format default setting 1: kr # ##0,00
* Money format default setting 2: $ #,##0.00

`Money#(A
 , '# ##0,00 kr' 
 )`   
where A=35 648,37 kr

Results

| Results | Setting 1 | Setting 2 |
| --- | --- | --- |
| String | 35<br>648.37 kr | 35<br>648.37 kr |
| Number | 35648.37 | 3564837 |

`Money#( 
 A, ' $#', '.', ',' )`   
where A= $35,648.37

Results

| Results | Setting 1 | Setting 2 |
| --- | --- | --- |
| String | $35,648.37 | $35,648.37 |
| Number | 35648.37 | 35648.37 |