>

Data viewer - formatting numeric values

David Stevenson -

You can specify simple format strings on any data series or calculation in the data viewer

The boxes to the right of each data series can accept a format string to perform the following operations:

Number of decimal places

Thousands separator format

Currency symbol

% symbol

Positive / negative / zero value format

 

Use the hash symbol (#) for each digit required after the units.

Number of decimal places are set with zeroes after the decimal point in the string.

Note that this determines the maximum value that can be displayed, so make sure to use a format that will accommodate the largest values ytou will be displaying.  Numbers too large for the format string supplied are displayed as <<<<<<.  In the example below the format string for Over / under billing only works for numbers below 999.99.

 

Examples of simple number formats:

String Description
###0.00 numbers up to 9999.99 can be displayed, showing 2 decimal places
###0 numbers up to 9999 can be displayed showing no decimal places
########0.00 numbers up to 999999999.99 can be displayed showing 2 decimal places

Large numbers are much easier to read with a thousand separator, so this is normally included like this

###,###,##0.00 numbers will now display like this 999,999,999.99

Including a currency symbol in the string will prefix numbers accordingly

£###,###,##0.00 numbers will now display like this £999,999,999.99

Similarly a percentage symbol can be added as a suffix like this:

###0% percentage values will be displayed betweeen 0% and 9999%

 

Negative and zero values can be formatted separately by supplying additional information in the format string, separated by semi-colons - positive number;negative number;zero.

If you do not specify these additional formats the positive number format will be used, but of course the value will be unaffected.  Note that at this time we cannot include colours in this formatting, but you can use parenthesis to format negative values:

£###,###,##0.00;£(###,###,##0.00);0.00 - this format string with format positive values between £0.01 and £999,999,999,99, negative values between £(0.01) and £(999,999,999,99), zero values will be displayed as 0.00.

£###,###,##0.00;-£###,###,##0.00; - this format string with format positive values between £0.01 and £999,999,999,99, negative values between -£0.01 and -£999,999,999,99, zero values will not be displayed.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk