Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
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
MVP & Luminary
MVP & Luminary

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
Creator III
Creator III

Use num() in the script?

MVP & Luminary
MVP & Luminary

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

Creator III
Creator III

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

Creator III
Creator III

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