Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
rdsuperlike
Contributor

Num function

I am using NUM(expression,'#.0%') to get results like 78.4%.

But how do i make it whole number without decimal, i.e rounding.

I want 78.49 as 79% and 78.44 as 78%. Any ideas?

Thanks in advance

Tags (2)
4 Replies

Re: Num function

How is 78.49% = 79%? Why not 78%? Isn't the cut off 78.5%?

rdsuperlike
Contributor

Re: Num function

yeah..that is correct. 78.5 should convert to 79%. I was trying to get 2 decimal accuracy. But even 1 decimal would work

Re: Num function

This seems to work for me

=Num(Round('78.49%', 0.01), '#.%')

Replace 78.49% with your field or expression

rajeshthakur292
Contributor II

Re: Num function

Hi Ria,

May be

if(wildmatch(NUM(expression,'#.00%'),'*.49%'),

Num(NUM(expression,'#.00%')+.0001,'##.0%'),

NUM(expression,'#.0%'))

Thanks,

RT