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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Convert text to numeric value and keep all decimals?

Some of the data are numbers, stored in text fields. When converting using:

NUM#([Text Result], '#') AS [Result]

... it can give the following results:

Capture.PNG

I want the same precision for the numeric value as the original text value, however this is not always what the code delivers. Why is the last two zeroes removed from row 4, but kept in row 2? How do I achieve what I need, what conversions are necessary?

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Num(NUM#([Text Result], '#'),'#.000') AS [Result]


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Still doesn't work:

Capture.PNG

Zeroes are sometimes still cut off.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Works for me. See attached example


talk is cheap, supply exceeds demand