Sometimes, you may want to represent the numbers on the report in **accounting format**.

If the numbers are negative, it will be represented within a bracket with the positive number, e.g. - 500 is represented as (500) in accounting format.

If the numbers are 0, it will be shown as "-".

Here is the sample code for you to transform your number to accounting format. The code of the indicator using is "M_AMOUNT" and the aggregation is SUM.

if(M_AMOUNT@SUM == 0) { return '-'; }else if(M_AMOUNT@SUM < 0) { return '(' + abs(M_AMOUNT@SUM) + ')'; }else { return M_AMOUNT@SUM; }

Overview

Content Tools