Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Iam geeting an error field not found [Cont_Year]. Can anyone help?
tab1:
LOAD
[Date of contract],
[Type of contract],
User,
rowno() as Sino
FROM
(ooxml, embedded labels, table is Лист1);
tab2:
load
User,
Year([Date of contract]) as [Cont_Year],
[Cont_Year]&''&[Type of contract]&''&User as Test,
if([Test]=previous([Test]),'Old User','New User') as User_Status
resident tab1;
Regards
KC
Hi,
Is that above script working? I used order by [Date of Contract] which is same as Year.
Regards,
Jagan.
No Jagan, its not getting ordered.
PFA
Regards
KC
Hi,
Attach some sample data and your expected output.
Regards,
Jagan.
Hi Jagan,
Its fixed now, thanks alot for your help.The above script worked with small changes.
Can you please tell me why you break the load statment into three parts.I am still learning all the stuff.
Regards
KC
Hi,
LOAD
*,
if([Test]=previous([Test]),'Old User','New User') as User_Status;
LOAD
*,
[Cont_Year]&''&[Type of contract]&''&User as Test;
load
User,
[Type of contract],
Year([Date of contract]) as [Cont_Year]
resident tab1
ORDER BY User, [Date of contract];
The above method is called Preceding Load, from top to bottom in Level 1 we calculated year and the same field we need to calculated Test, instead of calculating again we are reusing the field Cont_Year in layer 2, the same in layer 3.
Hope this helps you.
Regards,
Jagan.