Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hot to use the num() function to round up

Hey,

I'm trying to round up a number in a text box using the num() function.

I'm currently using the script: num(sum(budget),'#.##0',',','.') and getting the result: 35.756.

How should the script be if I want the result to be: 35.8?


Thanks,

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Not sure if I've understood your request correct, maybe like

=num(35768/1000,'#.0 k','.',',')

or

=num(35768/1000,'#.0','.',',')

View solution in original post

23 Replies
krishna_2644
Specialist III
Specialist III

=round( 35.756,0.1)

swuehl
MVP
MVP

Your value is 35756 (without the thousand separator) and you want it to show as 35.8?

Colin-Albert

num() is a number formatting function,

To round a number, use round(), floor() or ceil().


Not applicable
Author

Correct. Or to clarify; I have a function which give me a value of 35756 that I would like to round up to just one digit

Colin-Albert

round(sum(Budget) / 1000, 0.1)

swuehl
MVP
MVP

Not sure if I've understood your request correct, maybe like

=num(35768/1000,'#.0 k','.',',')

or

=num(35768/1000,'#.0','.',',')

MarcoWedel

Ceil(Sum(budget)/1000,0.1)

hope this helps

regards

Marco

saurabh5
Creator II
Creator II

Hi,

=ROUND(SUM(SALES),0.1)

Regards

S

Not applicable
Author

Hey Krishna,

Thanks for answering,

If I use that script, I get 35756,4 😕