Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Reducing Decimal Points in a Text Box to Zero

Hi Guys,

I imagine this is a pretty straight forward thing to fix.

I have the below expression in a text box:

='No of Products
' &
Sum(TOTAL)

Which returns the below:

As you can see it is giving me back a seemingly infinite amount of decimal places, How do I get the above expression to just return 32 as the value?

Any help is greatly appreciated

Thanks,

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

round(sum(TOTAL))

View solution in original post

6 Replies
Not applicable
Author

number format.PNGyou can go to the numbers tab, select that expression and then on the right, you can then define the field type, and optionally the number of decimal points

teiswamsler
Partner - Creator III
Partner - Creator III

Hi Scholar

You can use Num() function

Following is from the help menu in Qlikview

Number format

# ##0,#

#,##0.#

num( A, '0.0' ) where A=35648.375 returns:

    

Setting 1

Setting 2

String

35 648 375

35648.375

Number

35648375

35648.375

num( A, '#,##0.##', '.' , ',' ) where A=35648 returns:

    

Setting 1

Setting 2

String

35,648.00

35,648.00

Number

35648

35648

sasiparupudi1
Master III
Master III

round(sum(TOTAL))

Colin-Albert

On the Document Properties, Numbers tab, you can set the default format for the TOTAL field as an integer, then all occurrences of TOTAL will be  formatted as integers.

You can set defaults for all your number , date & time fields in this list

Anonymous
Not applicable
Author

hi,

Please try:

Select integer in Number tab to truncate decimal places

Anonymous
Not applicable
Author

This is perfect for what I need. Thank you!