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: 
psk180590
Creator III
Creator III

How to restrict to excatly 2 Decimal points in Script

Hello All,

When i use the below expression in my script

Round((Sum(Total1)/Sum(Total2))*100,0.01)

I get results as in the below screenshot

Unbenannt.PNG

Some values only have 1 decimal point, some don't have decimal point at all and few have more then 2 decimals.

What i would like to have is to restrict all the values to 2 decimal points.

Ex: -9,80

      -9,41

      -5,00

     .......

TIA!!

Labels (1)
4 Replies
tresB
Champion III
Champion III

Try like:

Num(

Round((Sum(Total1)/Sum(Total2))*100,0.01)

, '##.00')

psk180590
Creator III
Creator III
Author

Unbenannt.PNG

This is the result.

shiveshsingh
Master
Master

You can use num function

=num(Your Field,'###.00')

ogautier62
Specialist II
Specialist II

Hi,

try :

Round(your number*100)/100