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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with Decimal Precision

Hi,

I have a question. I have a straight table with one dimension (week). i want to show total quantity, so i write the expression with sum syntax. But the total value has different decimal precision with the data itself (3 digit precision).

this is my table.

img.png

each data has 3 digit decimal, but the sum(quantity) has many decimal.

Really appreciate your help.

Thanks

11 Replies
maxgro
MVP
MVP

for the sum(....) expression

choose a number format in number tab

sunny_talwar

Are you asking why is this happening? or looking for a solution for this??

Possible solution -> Num(Sum(QUANTITY_RETUR), '#.###')

parthakk
Creator II
Creator II

try explicitly setting number of decimal to expression.. it shall reflect in your total value as well

Not applicable
Author

Hi Massimo,

I dont want to change the number format. I am using expression default for number format. Decimal number must be the same with each data.

Do you know why ?

thanks

Not applicable
Author

Hi,

If there any value having the more decimal precision, then it will reflect in total. Use explicit number format for field.

maxgro
MVP
MVP

if you use expression default (left) you get different number of decimal

if you use a fixed format (right) in number tabb or you format the expression (num(sum(field), '#.##0,00') you get the same number of decimal for all values

or I'm missing something?

1.png

Not applicable
Author

Hi Massimo,

Yes, your left image your data is 12 decimal. but my data for each header and line have 3 decimal. So it must be the sum/total is 3 decimal also.

Thanks for your reply Massimo.

Not applicable
Author

Can you post your sample data or how are calculating your quality field values?

Not applicable
Author

Hi Sindhu,

Sorry i cant Sindu. I only use sum(quantity) for the expression. and add three dimension (week, header_id, and line_id).

Data for each header and line is OK with 3 decimal, but the total is more than 3 decimal. Really confuse about it.

Thanks.