Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
schoborg
Contributor
Contributor

Display decimals with no rounding

I have a field that is 4 or more decimals, but I only want to show 3 decimals and I do not want to round.

4 Replies
Miguel_Angel_Baeyens

Hi,

Do you mean in your script? Then use a number formatting function

Num(OriginalFieldName, '#,000') AS Fieldname

Or if you mean in a chart, go to the chart Properties, Number, and set it to fixed to three decimals.

Hope that helps.

Miguel

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can try with this

     Left(FieldName,Index(FieldName,'.')+3)

Hope it helps

Celambarasan

schoborg
Contributor
Contributor
Author

I have done this and it rounds in both instances.

Linda

swuehl
MVP
MVP

then try

floor(12.345678, 0.001)

edit:

if you also have negative numbers, you need to use ceil instead of floor for negative numbers

ceil(-12.345678, 0.001)

if( FIELD<0, ceil(FIELD, 0.001), floor(FIELD, 0.001))