Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Formatting numbers

Can someone please tell me what I need to add to the script to make sure I'm showing no decimal points in my calculations?

LOAD [Opportunity Name: Opportunity Name],

     Vendor,

     [Country Name],

     [LOG Description],

     [PO Number],

     Status,

     [LOG Received],

     [Invoice Received],

     [Bill Date],

     [Total Request Amount],

     [Reimbursement Amount]

FROM

(ooxml, embedded labels, table is report1357406142116);

Total Request Amt and Reimbursement Amt both have two decimal points which I'd like to not show if possible. Thanks.

1 Solution

Accepted Solutions
bharatahuja
Contributor II
Contributor II

The status of this question is in Not Answered state from almost 4 years. I don't think the questino is that difficult.

You can format the Straight or Pivot in the Number tab, while for an expression in a text box you can use different typ of functions like =Money(Sum(XYZ),'#,##0')

View solution in original post

7 Replies
nagaiank
Specialist III
Specialist III

If you do not want to consider decimals in the calculation, you can use either Floor or Round function to conver the number to integer as per your requirement.

If you do not want to show the decimals on the chart or table, you may specify it in the Number tab of the Properties window for the object.

Not applicable
Author

Do you know how I can round and preserve the money symbol? This is giving me the rounded number but no dollar sign.

=(round(money(sum(),0.)))

nagaiank
Specialist III
Specialist III

Try

=(money(round(sum(your_amount_field_here),0.)))

Not applicable
Author

Hi,

You can either use Floor(Value) as FieldName

or Round() function in the script to remove decimal places from the script itself.

Alternatively, you can change the number format in the front end by going to the Object Properties -- Override Document Settings - Number -- and setting it to show Number or Decimal Value (with 0 places) or Money format . But this is ideal only if you have a small number of objects that use your amount field since if there are too many object represeting the money value, changing the number format in the script will be more feasible.

Hope that helps.

Regards,

-Khaled.

Anonymous
Not applicable
Author

Use the Money function with the desired number formatting, like this

= MONEY ( SUM() , '$#,##0' )

maxgro
MVP
MVP

try to format in the charts (not in the script) using Number tab

1.png

bharatahuja
Contributor II
Contributor II

The status of this question is in Not Answered state from almost 4 years. I don't think the questino is that difficult.

You can format the Straight or Pivot in the Number tab, while for an expression in a text box you can use different typ of functions like =Money(Sum(XYZ),'#,##0')