Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

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?

1 Solution

Accepted Solutions
MVP
MVP

Re: Convert to integer ?

Hi

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

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
2 Replies
MVP
MVP

Re: Convert to integer ?

Hi

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

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

Re: Convert to integer ?

Thanks Jonathan,

floor(field) was apt in my case.

Community Browser