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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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!!

4 Replies
tresesco
MVP
MVP

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