Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Text to number Issue

Hi guys,

I have a number field populated as a text as following :

Quantity

11.000.000.000.000.000.000.000

12.000.000.000.000.000.000.000

14.000.000.000.000.000.000.000

When I load that field into Qlikview, it's recognized as a text, and I can't make any operation with that. I've tried formatting it with num(), num#(), replacing dots per commas or nothing, with no exit.

Anyone knows how to do it right?

Many thanks in advance.

Regards, Marcel.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Yes, you are hitting the max number of integer digits limit (I also believe it's 14 digits).

You can try loading the first few significant digits, then multiply by 1E21, something like

=subfield('11.000.000.000.000.000.000.000','.',1) * 1E21

implying a cast to floating point representation.

View solution in original post

3 Replies
Anonymous
Not applicable

That is 23 digits which is a lot and I have feeling more digits than QlikView can handle.

With just 14 digits this works though :

     =num(purgechar('11.000.000.000.000','.'))

swuehl
MVP
MVP

Yes, you are hitting the max number of integer digits limit (I also believe it's 14 digits).

You can try loading the first few significant digits, then multiply by 1E21, something like

=subfield('11.000.000.000.000.000.000.000','.',1) * 1E21

implying a cast to floating point representation.

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks guys for answering so quickly,

the maximum precission number that accepts is 18 digit, so I did this to make it work :

  num(purgechar(left(Quantity,18),'.')) as      Quantity

Regards, Marcel.