Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable format

New to Qlik. I created a variable name vSales. Once I start showing the variable in Text Object, it is showing as 24.456745 (multiple numbers after decimal point). Is there way I can get rid of numbers after decimal?

Thanks.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try

=round(vSales)

or

=round(vSales, 0.01)

View solution in original post

6 Replies
Not applicable
Author

try like this

=NUM($(vSales),'##0')

or

=Floor($(vSales))

Not applicable
Author

No luck..

I am getting "Error in Expression ')' expected"

Not applicable
Author

Let me know how expression and variable you have written

maxgro
MVP
MVP

look at these functions in Qlik help

floor ceil round

round( 2.4 ) returns 2

round( 2.6 ) returns 3

round( 2.5 ) returns 3

round( 3.88 , 0.1 ) returns 3.9

round( 3.88 , 5 ) returns 5

round( 1.1 , 1 , 0.5 ) returns 1.5

Not applicable
Author

Hello Muralidhar,

You can for sure use the above functions. I have however tried Uday's function and it is correct. I have created a variable vsales and referenced it in a text object and Uday'sfunction should work. Please see screen shot.

=num($(vSales),'##0')   as is should work

num_in_text_object.png

Anonymous
Not applicable
Author

Try

=round(vSales)

or

=round(vSales, 0.01)