Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Round Division to Two Decimal Places

Hello,

   I have an expression something like count(x)/count(y)  the results are sometimes many decimal places Ex. 1234/3.9 = 316.410256410256. Can you give me an example of the syntax to limit it to two decimal places?

Thanks

4 Replies
sunny_talwar

May be this:

Num(Count(x)/Count(y), '##.00')

Gysbert_Wassenaar

If you want to round then use the round() function: Round(Count(x)/Count(y), 0.01)

Other options are the floor() and ceil() function. The num() function will not round the value, but only change the display format.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you for answering this.

Not applicable
Author

Thanks for answering this.