Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rdsuperlike
Creator
Creator

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

Labels (1)
4 Replies
sunny_talwar
MVP
MVP

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

rdsuperlike
Creator
Creator
Author

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

sunny_talwar
MVP
MVP

This seems to work for me

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

Replace 78.49% with your field or expression

Neymar_Jr
Creator II
Creator II

Hi Ria,

May be

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

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

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

Thanks,

RT