9 Replies Latest reply: Dec 11, 2017 9:55 AM by Casey Marincin RSS

    How to display numbers with 2 decimal places

    Casey Marincin

      I am working in Qlik Sense Desktop (June 2017).  I have an app in which I am rounding certain fields to 2 decimal places.  After the rounding (via Round(field, 0.01)), I have noticed that some numbers don't retain 2 decimal places.  For example, if the rounded number is something like '3.00', the number gets displayed as '3'.  If the rounded number is something like '3.10', the number gets displayed as '3.1'.  How can I keep the trailing zeros, to always have 2 decimal places displayed after the number?

       

      My script is like:

      Load

          Round(Field1, 0.01) as Field1

      Resident

          T1

      ;

       

      The following does not resolve my problem:

      Load

          Num(Round(Field1, 0.01), #.00) as Field1

      Resident

          T1

      ;