Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
cristian_av
Creator III
Creator III

QV Wrong numbers interpretation (Interprets as Dates!)

Hi

I'm having some troubles with numbers in QV. I have a field which has numbers from 00000 to 999999.

Some numbers are being interpreted as dates, like 001207, that Qlikview interpret as 21-03-1903.

When I Create the QVD, the values are interpreted as number. But when i Load the QVD with another script, the values are interpreted as date.

I think i can use num() in every graph, but that's complicated and a bit useless.

How can I force QV to interpret some fields as numbers and not as Dates, if possible, in the load script?

I'm using the following load script:

[Consumos]:

LOAD CAS_ID,

  CARD_NUMBER  //Is interpreted as a Date, but it is NOT a date.

FROM

[..\..\QVDs\Consumos_Original.qvd] (qvd);

Thank you!!

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Go to the QVW Document Properties, Number tab. Select the CARD_NUMBER field and change it's format to Integer or Number.

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

4 Replies
Anonymous
Not applicable

Use num() in the script?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Go to the QVW Document Properties, Number tab. Select the CARD_NUMBER field and change it's format to Integer or Number.

-Rob

http://masterssummit.com

http://robwunderlich.com

cristian_av
Creator III
Creator III
Author

Thank you!

I also found the text() function that also works and keeps the 00001207 format

SO.. if anyone see this, the usage is:

num(CARD_NUMBER) as CARD_NUMBER           //1207

text(CARD_NUMBER) as CARD_NUMBER_TXT    //00001207

Anonymous
Not applicable

You can also specify integers to have leading zero's.  If the integer is always 8 digits long then num(CARD_NUMBER,'00000000') will result in 00001207 and remain an integer.

http://community.qlik.com/blogs/qlikviewdesignblog/2012/12/18/number-format-codes