Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
New Contributor II

Re: Formatting numbers

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')

7 Replies
Highlighted
nagaiank
Valued Contributor III

Re: Formatting numbers

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

Re: Formatting numbers

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
Valued Contributor III

Re: Formatting numbers

Try

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

Not applicable

Re: Formatting numbers

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.

eggbert47
New Contributor II

Re: Formatting numbers

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

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

MVP
MVP

Re: Formatting numbers

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

1.png

bharatahuja
New Contributor II

Re: Formatting numbers

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')