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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
chhavi376
Creator II
Creator II

Rounding off to an integer using NUM

I was trying to round off all my numbers to integer but i came across this problem:

if i use '#,##0.00'  in num, i get these numbers:

Untitled.png

When we round this off, it should ideally be 16, 27 and 35

But when i use '#,##0'  in num, i get these numbers:

1.png

37 Replies
chhavi376
Creator II
Creator II
Author

these are the backend values:

Untitled.png

This is the expression i am using:

round(Sum( {<flag={1},Products-= {'Product1'}, Metric_Type={'abc'} >}  Metric_Value_N),1)

This is the output in the table:

1.png

saimahasan
Partner - Creator III
Partner - Creator III

please find attached file after using round()

vinieme12
Champion III
Champion III

use CEIL() to roundup values

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable

remove ,1 and check like this

round(sum(value))

adamdavi3s
Master
Master

Hi chhavi376

Are you 100% sure on the degree of accuracy of your source data?

I have been foxed and infuriated before by this sort of thing, please see the attached file noting items A and H in the table and how the different rounding accuracies produce different answers

SSMS can also sometimes be a bit of a douche, i'd run something like CAST(yourfield AS float) just to be 100% sure.

If that shows 15.5 then I am stumped!

chhavi376
Creator II
Creator II
Author

It is still giving the same values.

chhavi376
Creator II
Creator II
Author

I just checked.

It is working fine in your QVW.

I really don't know why is it coming wrong in mine.

chhavi376
Creator II
Creator II
Author

Hi Adam,

I queried it in my SQL server.

My data in the reporting table in only upto one decimal place.

adamdavi3s
Master
Master

I am totally baffled then I am afraid!

Its very weird indeed.

Have you tried to just create a straight forward app purely pulling that field and testing the rounding?

That would at least point us to either a data issue or an app issue!

Anil_Babu_Samineni

From your Report 13.5 -- What are you expecting. Because, These are giving exact Round Values without Decimals. Let me know your expectation from that Report value

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful