2 Replies Latest reply on May 4, 2017 6:56 AM by András Fintor

    INT() and ROUND() strange behavior

    András Fintor



      I'm looking at a very simple scenario to turn hours (decimal number) in a better formatted "dd hh:mm" format. I have seen the formatting tips on the net and also number converting to dates, so the question is NOT about this,

      The issue I'm seeing is that Tableau does some really weird and inconsistent calculations when using INT() or ROUND().

      • online_hours holds the hours as decimal number as you see from the pic
      • online_hours_INT is a calculated field: INT(online_hours)
      • online_hours_ROUND is a calculated field: ROUND(online_hours)


      ..see the problem, e.g. row 6:     original: 35.12     INT(35.12)=32.00     ROUND(35.12)=36.00


      I have checked formatting for all fields to custom number, 2 decimals to avoid any rounding by format.

      Any ideas what this is, what am I doing wrong, what could be the issue with the data (if thats the cause???), have you seen anything like this before?

      Thanks a lot,