Discussion Board for collaboration on QlikView Scripting.
I want to create a calculated column from an calculated column.
Below is the example:
[Date of Birth],
if([Date of Birth]='','Null',[Date Of Birth]) as [DOB], /* First Calculated Column*/
timestamp([DOB],'YYYY') as 'Ýear', /* Second calculated column derived from First Calculated Column [Date of Birth] */
month([DOB]/3) as 'Quater' /* Third calculated column derived from First Calculated Column [Date of Birth] */
I am getting an error message as [DOB] not found. But if i remove the second and third calculated columns then no error the script executes successfully.
timestamp([DOB],'YYYY') as 'Ýear',
month([DOB]/3) as 'Quater' ;
[Date of Birth] ;
Sorry, but this is not working correctly. Now I am not getting any error message but the data is not coming thru correctly.
This is the code I have used.....
LOAD *, Timestamp(DOB,'ÝYYY') as Year, month(DOB/3) as Quater; LOAD Name, Date as DOB FROM (ooxml, embedded labels, table is Sheet1);
... this is another question, you never said what you tried to achieve, so please explain...
have to use ceil or dual function to get the quarter
something like ceil(month(dob)/3) as quarter or dual('q' & ceil(month(dob)/3), ceil(month(dob)/3)) as quarter
coming to the calculated fields, you cant use those in the same table. use resident load and use them
can you please share exactly what you trying to achieve here....