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

Converting text values to number

I have a field that is text that I would like to convert to a number so I can do conditional formatting. The values in the field are formatted like this:

 

1

1-

1+

How can I convert this to a number and strip out the -'s and +'s so I can do conditional formatting?

2 Replies
Taoufiq_Zarra

If I understood correctly, one solution :

Data:

load *,num(keepchar(Field,'0123456789')) as FormatedField inline [
Field
1
1-
1+
];

 

Taoufiq_ZARRA_0-1593098972206.png

 

Regards,
Taoufiq ZARRA

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

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

but if you want to keep '-'

just num(Field)

Capture.PNG

Regards,
Taoufiq ZARRA

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

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