Round up

Merges a number rounded up, never down. Use it where a part counts as a whole, such as the number of boxes an order needs or the days left on a subscription.

Syntax

{{roundUp data precision culture}}

Parameters

Name Type Required Description
Data Number Required The value to round.
Precision Number Optional How many digits to keep after the decimal point. Leaving it out, or using 0, rounds up to a whole number.
Culture Text Optional The culture used to write the decimal separator, such as pt-BR. Your account's default is used when you leave it out.
Note: If the value is empty or is not a number, 0 merges.
Note: Rounding up moves away from zero for a positive value, so 16.21 at a precision of 1 gives 16.3 even though normal rounding would give 16.2. For normal rounding use Round, and to always go down use Round down.

Examples

The examples below are based on the following sample content:

Order total: {{roundUp Contact.orderAmt 2}}

A. The contact's orderAmt field has the value 16.399

Order total: 16.40

B. The same value is 16.548 and the precision is 1

Order total: 16.6

C. The value is 16.21, the precision is 1, and the culture is pt-BR

Order total: 16,3

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us