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: 
veeranj
Creator II
Creator II

Interpretation of numbers like 1.4 and 1.40 in qlikview

Hi All,

I have a application field and its release field and every release has its own version.

where the versions are of 1.4 and 1.40 values .

in database these versions have values as above .

but when i load it in qlikview it is showing both the values as 1.40.

Can anyone please let me know how to resolve this.

Thanks in advance.

Anjee

15 Replies
vincent_ardiet
Specialist
Specialist

Hi,

The Text() is the good thing to do (I've expected the same issue with code starting with 0).

Maybe can you try to force into your excel sheet the format of your cell to be text and not number?

Regards,

Vincent

hic
Former Employee
Former Employee

If QlikView interprets 1.40 and 1.4 as numbers, then they are identical and will be treated as one and the same value. Changing formatting - either with the Num() function or the Numbers tab - will not change this.

If you want QlikView to treat the two as different values, you need to load them using the Text() function.

HIC

veeranj
Creator II
Creator II
Author

HI Henric,

Thanks for the reply.
I tried using the Text(version) also.but then also it is giving all the converted values as same.

I have attached the source and output in the above query.

Thanks,

Anjee

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Are you loading from a database table, text file or Excel?

If database - what is the type of the field? It should be a char/text type, not a number type. If it is a number type, ODBC /OLEDB is returning a number, so the 0 will be lost before it gets to QV, and text(Field) will return 1.4.

If Excel - is the value numeric (right aligned) or string (left aligned)? If it is numeric, again the 0 will again be lost before it gets to QV and Text(Field) will return 1.4

If the data source is delivering text "1.40", then Text(Field) will return "1.40".

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
veeranj
Creator II
Creator II
Author

Hi

I am loading the data from the data base (ODBC).

Fieldname is VERSION,

Datatype is varchar(50).

Thanks,

Anjee

iktrayanov
Creator III
Creator III

Try this

Select

'V-'+VERSION as VERSION

FROM Your table

in your load from QDBC source this should force QlikView to save it as text

Then you can manipulate it back to 1.4 or 1.40 using subfield() function