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

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

numeric variable in alphanumeric

Hi,

I have a question:

from a database field numbers (like 2, 0) and importing it into qvw if the first digit is a number ,

becomes 1 instead of 01 or 2 instead of 02 ... etc. ..

My solution when I do the load:

Repeat ('0 ', 2 - Len (Text (Num # (Variable, '00')))) & Text (Num # (Variable, '00')) as variable1;

ok ...

ok ... the "text" and "num" are not going well in this case

There is a more "simple"?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

left('00',2-len(Variable)) & Variable as Variable1

not quite the most elegant solution, but it's a bit more simple.

View solution in original post

5 Replies
Not applicable
Author

Hi William,

ia´m not sure if i understand your question correctly.

But this works for me:

Num

(

(

(

Be aware that the NUM function only works to 13 or 14 digits.

You can use in cases like this EVALUATE but without decimals.

See the attached file as an example for this.

Rainer

Numbers, '000000') as NewNumbers



Not applicable
Author

Sorry,

I mean:
I have a numeric variable containing:

01
02
03
04
...

importing into QlikView me becomes:

1
2
3
4

whereas I would like him to stay:

01
02
03
04

but withe command text or num not like...

Thanks
Not applicable
Author

Try it

ArticoliNew:
Noconcatenate
LOAD text(CODICE) as CODICE,
DESART
resident Articoli;

Daniela

Not applicable
Author

I already tried

Text (variable)

but since the variable is defined numeric, text has no effect ..

Not applicable
Author

left('00',2-len(Variable)) & Variable as Variable1

not quite the most elegant solution, but it's a bit more simple.