Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ahmedwank
Contributor III
Contributor III

convert to number

hi

i would like convert the second column SSCC to number and in this column there is sometime a value of "????" that we should ignore 

i tried to put in script num(SSCC) but it doesnt work

 please find here attached a small file 

if you can help

 

thanks

 

 

1 Solution

Accepted Solutions
Taoufiq_Zarra

did we work with the same source file?


I tested the function in Qlikview and Qliksense and it works with the sample data you sent

datt.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

4 Replies
Taoufiq_Zarra

Hi,

try this solution

in the script you will add this code

Num(Num#(replace(SSCC,',','.'),'#', '.', ','), '(dec)') as New_SSCC

because a classical formatting does not allow to interpret the SSS column as a number

this code will work well, see result below :

datt.PNG

cheers,

Taoufiq

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ahmedwank
Contributor III
Contributor III
Author

thanks Taoufiq for helping

unfortunately even when i add this code on my script that doesnt work

it seems that the New_SSCC column is empty 

please see attached picture 

 

Taoufiq_Zarra

did we work with the same source file?


I tested the function in Qlikview and Qliksense and it works with the sample data you sent

datt.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
sebastianfaust
Partner - Creator
Partner - Creator

maybe:

Num(SSCC, '#################')

?