# asPercentage and asCurrency in Jira Automation: examples

URL: https://goingstellar.ro/reference/smart-values/aspercentage-ascurrency/

asPercentage turns a fraction into a percentage and asCurrency formats a number as money. Both take an optional locale, which changes the separators, the position of the symbol and the symbol itself.

## Syntax

```
{{number.asPercentage}}
{{number.asPercentage("fr_FR")}}
{{number.asCurrency}}
{{number.asCurrency("fr_FR")}}
```

## Arguments

- `locale` (required: no): A locale code with an underscore, such as fr_FR or de_DE; the US locale is the default

## Works on

- Numbers: number fields and calculated numbers
- Returns: text

## Examples

```
{{issue.summary.length().multiply(1234).asCurrency}}
```

Show a calculated amount in US dollars (12 characters times 1234).

Result:

```
$14,808.00
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.length().multiply(1234).asCurrency("fr_FR")}}
```

The same amount in French formatting, with the euro sign after the number.

Result:

```
14 808,00 €
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.length().multiply(1234).asCurrency("de_DE")}}
```

German formatting uses dots for thousands and a comma for decimals.

Result:

```
14.808,00 €
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.comments.size.divide(4).asPercentage}}
```

Print a share as a percentage.

Result:

```
0%
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.comments.size.divide(4).asPercentage("fr_FR")}}
```

French formatting puts a space before the percent sign.

Result:

```
0 %
```

Run on Jira Cloud on 29 Nov 2026.

## Pitfalls

- asPercentage expects a fraction, so a value that has lost its decimals prints 0%: with 2 comments, `issue.comments.size.divide(4)` is 0 because whole-number division drops the fraction, and `asPercentage` prints 0% (checked on Jira Cloud, November 2026).
- The locale sets the currency symbol, not the amount. The docs show fr_FR output as 0,12 followed directly by the euro sign, while a real run printed the amount with a no-break space before it, and a narrow no-break space (U+202F) in the thousands (checked on Jira Cloud, November 2026).
- Currency and percentage fields that are empty print an empty string, as the doc examples on a site without those fields do.

## Related

- [format() and formatWithLocale()](https://goingstellar.ro/reference/smart-values/number-format/)
- [{{#=}} math expressions](https://goingstellar.ro/reference/smart-values/math-expressions/)
- [plus(), minus(), multiply(), divide() on numbers](https://goingstellar.ro/reference/smart-values/plus-minus-multiply-divide/)
- [locale() and withLocale()](https://goingstellar.ro/reference/smart-values/date-locale/)

## Sources

- [Jira smart values: math expressions (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/)

