Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
in my select list this number appear as a text : 31 920 (left side)
how to convert it to a number in the load script.
Thanks
Num(replace(number_field, ' ', '')) as number_field
What number does 31 920 represent? 31920, 31, 920?
More details would help you get the right answer.
31 920 is 31920 with thousands separator in my excel sheet
Just set the correct thousand separator as default in your script or use num#() to parse the string in:
num#('31 920',',',' ')
(assuming ',' as your decimal separator, please check the format codes in the Help for more detail)
There is nothing like string to number conversion because there is only one datatype in QlikView and it's DUAL. In your case I'd just set proper formatting for the field in Document Properties => Number.
It this doesn't work your field can't be interpreted as a numeric value, and you have to do it manually using Num#()
Lukasz
Go to properties and check the Override Document Settings
Num(replace(number_field, ' ', '')) as number_field