2 Replies Latest reply: Jul 10, 2012 3:05 AM by Vishnu S RSS

    Convert to integer ?

      I searched in community but could not find a good answer for this.


      I am taking into qlikview, a field which is having decimal values like 1.0,2.0,3.0 etc

      I want to convert them into integers 1,2,3..etc


      Is there any qlikview function for this?

        • Re: Convert to integer ?
          Jonathan Dienst



          Qv does not differentiate between integers and real numbers, but if you want to display them like 1, 2, 3... then just use Num(field), or Num(field, '0').


          As far as functions go


               floor(field) - will discard the fractional part

               ceil(field) - will discard the fractional part and round up to the next integer

               round(field) - will round the value to the nearest integer. (check the manual for other round options)


          Hope that helps