Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Convert string to number in load script

Hi all,

I need your help with a problem I can't solve... I am trying to convert a string to a number in a load script (please see attached document). The first picture shows the load script where I use num() to convert. The second picture shows a table where you can see that the former text has been replaced by numbers (Column is called TrainingNumber). Although when I export the data to excel I get a strange data type (or strange to me...) = CUSTOM and the value in the cell looks strange too. See picture 3.

Thanks in advance!!!

1 Solution

Accepted Solutions
Employee
Employee

Re: Convert string to number in load script

The number is correct in QlikView, but just formatted scientifically in Excel.

HIC

6 Replies
Employee
Employee

Re: Convert string to number in load script

The number is correct in QlikView, but just formatted scientifically in Excel.

HIC

Re: Convert string to number in load script

How does your input data look like?

Not applicable

Re: Convert string to number in load script

Thank you!! That sounds good

Not applicable

Re: Convert string to number in load script

The input data is 'Strongly Agree', Agree', Disagree', Strongly disagree' which has been converted to 1,2,3,4
(I need the convertion to make a scatter chart)

Employee
Employee

Re: Convert string to number in load script

By the way - the following would be a slight simplification of your field definition:

     Match(Answer,'Strongly agree','Agree','Disagree','Strongly disagree','N/A') as TrainingNumber

HIC

Not applicable

Re: Convert string to number in load script

Tnx for the tip!