Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Text or number converted to unintended number format in QV Objects

Hi folks,

I'm having a trouble when loading a data content from a specific SQL table field. The table is a two "from/to" fields table which I have a varchar field with a code that have its correspondent destiny code in the field two (It's a 1:1 quantifying).

For example:

Field 1 (From Code)Field 2 (To Code)
0001AAAA
00D0BBBB
002GCCCC
00E8DDDD

The issue is:

  • The Qlikview objects (List, table, graph tables, etc) show contents such as the one highlighted in red above as an unintended content. In this case, the field content was converted to "00D0", but it does not make any sense.

I tried to troubleshoot by using Excel and discovered that Microsoft Excel automatically applies a built-in number format to a cell, based on the following criteria:

  • If a number contains a slash mark ( / ) or hyphen (-), it may be converted to a date format.
  • If a number contains a colon (:), or is followed by a space and the letter A or P, it may be converted to a time format.
  • If a number contains the letter E (in uppercase or lowercase letters; for example, 10e5), or the number contains more characters than can be displayed based on the column width and font, the number may be converted to scientific notation, or exponential, format.
  • If a number contains leading zeros, the leading zeros are dropped.

(from Microsoft Support: http://support.microsoft.com/kb/214233/en-us

For instance if you enter with the value 00E8 in Excel, the result will be something like:

"0,00E+00" (It can be resolved by changing the cell format to Text before entering with the value).

Coincidentally, QV also had trouble when interpreting this content format, so I would ask you if it's already a known issue that you guys have already faced.

The point is: the content is varchar type in SQL, so I was not expecting this trouble in QV.

I resolved this directly in SQL database by changing the code content pattern, but I would like to know if it can be considered a bug in QV.

Tks in advance.

Rubens Rodrigues

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Ruben,

QlikView tries to infere the content and transform your data based on some rules, slightly similar to Excel does.

View solution in original post

5 Replies
swuehl
MVP
MVP

If you want to prevent QV from trying to interpret a value as number, I think the common approach is to use text() function in the LOAD script:

LOAD

     TEXT(Field1) as Field1,

     TEXT(Field2) as Field2

FROM ...;

Anonymous
Not applicable
Author

Thank you swuehl!

Do you know whether QV is agreed to interpret data such as Excel does or it's a bug?

Rubens Rodrigues

Clever_Anjos
Employee
Employee

Ruben,

QlikView tries to infere the content and transform your data based on some rules, slightly similar to Excel does.

Anonymous
Not applicable
Author

Thank you for the clarification Clever!

swuehl
MVP
MVP

If you follow Henric on his design blog, you sometimes get an answer on how things work in QV, e.g. here.