KNOWLEDGE BASE

Rounding Numbers Up to the Next Integer


Published: 16 Jun 2014
Last Modified Date: 09 May 2017

Issue

How to round numbers up to the next integer.

Environment

Tableau Desktop

Resolution

  1. Create a calculated field that finds the last digit of the number. For example: FLOAT(RIGHT(STR([Amount]),1)). In this case 1.2 will return a value of 2. 
  2. Create an IF statement that uses this amount, and then adds the number necessary to round up to the next whole number:
    If [Last Digit In Field] > 0 Then [Amount] + ((1 - [Last Digit In Field]*.1))
    Else [Amount]
    End
Did this article resolve the issue?