Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon all,
I would like some help modifying the script to force a column to import as numbers to make it easier to work with in an expression in the QV doc.
Is there a way to do that? or do I need to do this in the QV doc somehow?
Thanks,
Steve
You can use the num# function to create a number from a string.
num#(MyField) as MyNumber
There are three optional arguments for format string, decimal separator and thousands separator. See the help file for more information.
Hi,
You can use Autonumber() or RowNo() in the script.
Regards,
Vivek
How do I do that?
Steve
QlikCommunity<http://community.qlik.com/index.jspa>
Re: Force import of column as number in script
created by Vivek Niti<http://community.qlik.com/people/vivek.niti> in New to QlikView - View the full discussion<http://community.qlik.com/message/340455#340455>
Hi, u can use the functions as
LOAD *,
autonumber(KEY1) AS Auto_num
From....
OR
LOAD *,
RowNo() AS RowCount
FROM.....
Autonumber() - it assigns a unique value to the string.
RowNo() - it inputs the row number for the records..
regards
Mayby I am missunderstanding or maybe I have not been clear...The column I an trying to load is from a spreadsheet where the clumn is currently loaded as text. I need to load the values as numbers rather than text so my expressions will work in the QV doc.
I do not want to replace the values with sequential numbers which is what these options seem to do.
Thanks though.
Steve
I have tried this but I still have entries that QV is not seeing as numbers so I may still be doing something wrong.
Just to confirm, this is a process i can use in the script correct? And it would convert text values in the column to numbers?
Thanks!
Steve