Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Interge and Decimal

how do you get the whole number and then the decimal?

Example: 1500.90

I want only what is before the point and then just what is the point after.

Result: 1500

Result: 90

thank you

Labels (1)
2 Replies
goldnejea8
Partner - Creator
Partner - Creator

Try something like this

subfield(NUMBER,'.',1) as [Before Decimal]

subfield(NUMBER,'.',2) as [After Decimal]

goldnejea8
Partner - Creator
Partner - Creator

And if you need to make sure it is still a number after the fact, you could try something like this:

num(subfield(NUMBER,'.',1),'# ##0,#') as [Before Decimal]

num(subfield(NUMBER,'.',2),'# ##0,#') as [After Decimal]