In Arcadia Instant, you can format numbers and values to customize how they are displayed. As an example, you may wish to format a value to round off a number, or to add a comma to separate thousands in a currency value and add a $ (US dollar) sign.

In this post, I’ll show you how you can change the display format of numbers in Arcadia Instant along with a couple of examples.

The following steps demonstrate how to edit the display format in Arcadia.

1. When creating or editing a visual, determine for which Dimension or Measure you must adjust display format.

We are using `sum(population)`

, on a **Measure** shelf, in a visual built from *State Census* dataset.

2. Click the down arrow icon to the right of the variable.

3. In the dropdown, click **Display Format**.

4. In the **Enter Display modal window**, write the expression to edit display format.

5. Click **Save**.

6. Click** Refresh Visual**.

**Display Formats**

Arcadia supports most of the common display formats. The high level syntax when using number formatting is:

`[[fill]align][sign][symbol][0][width][,][.precision][type]`

The format style for each function is signified below:

Format Style | Values | Description | Examples (Input: 5679.00) |

Fill | All characters | Accepts all characters except curly brackets ‘{‘ ‘}’ | “*<6” => “5679**” “*>6” => “**5679” “*^6” => “*5679*” |

Align | < | Forces left-alignment within the specified space | |

> | Forces right-alignment within the specified space (default) | ||

^ | Forces central alignment within the specified space | ||

Sign | Plus + | Uses a sign for both positive and negative numbers | “+” => “+5679” |

Space | Uses a leading space on positive numbers, and a minus sign on negative numbers | ” ” => ” 5679″ | |

Symbol | $ | Prefixes a currency symbol | “$” => “$5679” |

0 | 0 | Enables zero-padding | “06” => “005679” “6” => ” 5679″ |

Width | width | Defines the minimum field width (If not specified, the width is determined by the content) | |

, | , | Enables the use of a comma to separate every 3rd digit | “,” => “5,679” |

Precision | .precision | Indicates how many digits to be displayed after the decimal point for a value formatted with types “e”, “f” and “%”, or before and after the decimal point for a value formatted with types “g”, “r” and “p” | (see f, g, r, p, and % types for examples) |

Types | b | Binary: Outputs the number in base 2 | “b” => “1011000101111” |

c | Character: Converts the integer to the corresponding Unicode character before printing | “c” => “ᘯ” | |

d | Integer: Outputs the number in base 10. Ignore non-integer values | “d” => “5679” | |

e | Exponent notation: Prints the number in scientific notation using the letter ‘e’ to indicate the exponent | “e” => “5.679e+3” “.1e” => “5.7e+3” | |

f | Fixed point: Displays the number as a floating-point number | “f” => “5679” “.1f” => “5679.0” | |

g | General: For a given precision p >= 1, this rounds the number to ‘p’ significant digits and then formats the result in either fixed-point format or in scientific notation, depending on its magnitude | “g” => “5679” “.2g” => “5.7e+3” “.5g” => “5679.0” | |

n | Formatted Number: This is the same as’d’, except that it uses the current locale setting to insert the appropriate number separator characters. | “n” => “5,679” “.2n” => “5.7e+3” “.5n” => “5,679.0” | |

o | Octal: Outputs the number in base 8 | “o” => “13057” | |

r | Rounded: Similar to general format but does not use scientific notation | “r” => “5679” “.2r” => “5700” “.5r” => “5679.0” | |

s | String: Rounded and using scientific notation, but with a unit suffixedIt would render micro (0.000001 or 10-6) as 1.00μ, and it would render tera (1,000,000,000,000 or 1012) as 1.00T. | “s” => “5.679k” “.2s” => “5.7k” “.5s” => “5.6790k” | |

x | Hex: Outputs the number in base 16, using the lower- case letters for the digits above 9 | “x” => “162f” | |

X | Hex: Outputs the number in base 16, using the lower- case letters for the digits above 9 | “X” => “162F” | |

% | Percentage: Multiplies the number by 100 and displays in fixed ‘f’ format, followed by a percent sign | “%” => “567900%” “.1%” => “567900.0%” |

**Detailed Example**

We are working with the dataset *Total Capital Expenditures for Companies with Employees by Industry Sector* [Data source].

To visualize the Data better, we have used cross tabulation, placing the *Industry* on the **X** shelf, *Year* on the **Y** shelf and *Total Expenditure* on the **Measure **shelf.

Here’s how the raw data looks:

1.The input of .2e in the Enter Display Format window shows exponential format with 2 digits after decimal.

2.The input of .1f in the Enter Display Format window displays a format with 1 digits after the decimal.

3.The input of 05 in the Enter Display Format window displays a 5 digit number with zero padding.

4.The input of $.2fs in the Enter Display Format window displays a format with a $ sign and Roman numerals with 2 digits after the decimal.

5.The input of *^9 in the Enter Display Format window displays a 9-character format that is centrally aligned.