Klipfolio. The KPI Dashboard - Evolved
The KPI Dashboard – Evolved
1-877-233-6149
Contact Us

Displaying values as currency

Problem:

You want to display the numerical data as currency.

Solution:

To display a currency sign by the numeric value, use format: "currency(<currency symbol>)"; with type: number;. Be sure to save your Klip file in the encoding that supports the currency character.

For example, the first column of this Klip uses the style settings below:
http://www.klipfolio.com/images/content/cookbook/currency.png


<style>
  item {
    type: item;
    definition: all;
  }
  dollar {
    type: number;
    itemcol: 1;
    format: "currency($)";
    formula: sum;
  }
</style>

(formula: sum; is used in this example to demonstrate that the currency symbol is also displayed for the results. The formula property is not necessary in order to use format: "currency(<currency symbol>)".)

For some currencies, you may also like to include decimal points, as shown in the second column above. For this, simply add decimal(x) to the format property, where x is the number of decimal points you want to display. Note that no spaces should be included for format values:

format: "currency($),decimal(2)";

Leave a Comment

To leave a comment, you must sign in or register (it's free).

   
Comment Type:
Title:
Comment: