Percentage Display Formats

Arcadia Data enables you to specify percentage format for a numerical field.

Tip. The % operation automatically multiplies the number by 100. If your data source reports percentages as whole numbers ('2%' is stored as '2' instead of '0.02'), you must divide by 100 first. We recommend that you make this adjustment globally, in the Dataset Attribute Definition interface, as described in Changing Column Calculation.

The following steps demonstrate how to properly use percentages, the % format option, with display format.

  1. Click on the field you plan to modify, to open the Field Properties menu.
  2. Under Field Properties, click the Display Format option.

  3. In the Display Format interface, select Percentage from the Category menu.

  4. Make the adjustments, as needed:

    • Under Decimal Places, change the number of decimals.
    • To show no decimals, clear the Decimal Places text box.
    • To show all decimals, select the All option.
    • Select the Use 1000 separator option.

    Click Save.

    display format in Percentage mode
  5. Click Refresh Visual.

Percentage Display with Cereals Dataset

Here, we are using a basic table visual built in the Cereals dataset.

  1. Start a Table visual on the Cereals dataset.
  2. Populate the shelves from the available fields (Dimensions, Measures, and so on) in the Data menu.

    • Place cereal_name on the Dimensions shelf.
    • Place calories, protein_grams, fat_grams, dietary_fiber_grams, complex carbohydrates_grams, sugars_grams, and sodium_mg on the Measures shelf.
  3. [Optional] Use Alias to rename the fields on the shelf to % Daily Calories, % Daily Protein, and so on.
  4. Ensure that the aggregation function used by the measure is Average, for calculations in the next step. See Aggregates.

  5. To calculate the percentage of daily recommended intake that a portion of each cereal represents, edit the expression of each field to divide by daily values.

    Daily Intake Recommendations
    Calories Protein Fats Fiber Carbohydrates Sugar Sodium
    2000 cal 50 grams 70 grams 30 grams 310 grams 90 grams 2300 milligrams
  6. Finally, set the display format for the re-calculated fields.

    For all the fields on the Measures shelf, change the Display Format to Percentage, select a 2- decimal display, and click Save.

  7. Click Refresh Visual.
  8. Note that the visual's display has the specified format, the % sign, and 2 decimal places.