Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
jyothish8807
Master II
Master II

Field not found


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

Best Regards,
KC
15 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Is that above script working?  I used order by [Date of Contract] which is same as Year.

Regards,

Jagan.

jyothish8807
Master II
Master II
Author

No Jagan, its not getting ordered.

PFA

Regards

KC

Best Regards,
KC
jagan
Luminary Alumni
Luminary Alumni

Hi,

Attach some sample data and your expected output.

Regards,

Jagan.

jyothish8807
Master II
Master II
Author


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

Best Regards,
KC
jagan
Luminary Alumni
Luminary Alumni

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.

jyothish8807
Master II
Master II
Author

Thanks a lot jagan mohan, today i learnt a new thing.

Regards

KC

Best Regards,
KC