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: 
pauluk__
Contributor III
Contributor III

Num expression as integer when integer, else 1 decimal place

Hi,

I'm trying express a mix of different numbers as either an integer or to 1 decimal place.

Is there anything I can do just in the Num expression that would achieve this?

Num(Sum(Number), '#,##0.0') places everything at 1 decimal place, even integers.

Thanks for the help.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

You may try conditional statement like:

=If(floor(Variable1)=Variable1, Variable1, Num(Variable1,'#,##0.0'))

Now replace Variable1 with your expression.

View solution in original post

3 Replies
Anil_Babu_Samineni

Even Integer means, Do you have any different Types. Would you provide sample data and expected result?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
tresesco
MVP
MVP

You may try conditional statement like:

=If(floor(Variable1)=Variable1, Variable1, Num(Variable1,'#,##0.0'))

Now replace Variable1 with your expression.

pauluk__
Contributor III
Contributor III
Author

Hi,

Yes that is a good way of checking this thanks. I was looking more to see if it was possible in the Num expression formatting?