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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
marco_puccetti
Partner - Creator
Partner - Creator

Round Percentage

Hello i need to round a percentage value from

nn.n1n2n3n4n5n6 to nn.n1 which function can i use?

The formula used is the following:

=num(count(distinct value1),'#,##0.##','.' , ',') / num(Count(distinct value2),'#,##0.##','.' , ',') * 100 & '%'

Thanks

Marco

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Num(12.34567, '##.##') - for two possible decimal

Num(12.34567, '##.00') - for forced two decimal

View solution in original post

6 Replies
Not applicable

Do you just need the displayed format to be to 1 decimal place?

avinashelite
MVP
MVP

add this in num

'###,###,###.##0,00'

num(count(distinct value1),'#,##0.##0,00','.' , ',') / num(Count(distinct value2),'#,##0.##0,00','.' , ',') * 100 & '%'

Thanks

marco_puccetti
Partner - Creator
Partner - Creator
Author

It doesn't work!

How can i force the 2 decimal value?

Thanks

Marco

tresB
Champion III
Champion III

Num(12.34567, '##.##') - for two possible decimal

Num(12.34567, '##.00') - for forced two decimal

marco_puccetti
Partner - Creator
Partner - Creator
Author

Yes i've just tried with Num(123456.789789789,'##.##') and it works.

Thanks

Marco

alex_millan
Creator III
Creator III

Hi,

and perhaps you may want to force the desired format (two decimal values) on the division result

= num( ( [Expression A] / [Expression B] ) * 100, '##,00' ) & '%'

HTH

Regards