5 Replies Latest reply on Sep 20, 2016 12:51 AM by david dansby

    Truncating numbers

    Holly Thompson

      Hi,

       

      I have a column of numbers that I need truncated to 2 decimal places. Everything I have tried so far will get me to just 2 decimal places, but it is rounding.

       

      For example 9.96666, I need this to be 9.96. Truncate is the right function, but it doesn't seem to exist in Tableau. Everything I have tried so far returns 9.97.

       

      I have converted it to a string and then use a combination of "Find","Left" and "Mid" by using the location of the decimal place - this works, I end up with the right amount in every case, but it ends up as a string, and I need it to be a number.

       

      Any suggestions on how to either just truncate the number, or convert my string concoction to a number?

       

      Thanks,

      Holly