Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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
1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

tab1:
LOAD
[Date of contract],
[Type of contract],
User,
rowno() as Sino
FROM

(ooxml, embedded labels, table is Лист1);

tab2:

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];

Where you are trying to sort?  In script or in charts?

Regards,

Jagan.

View solution in original post

15 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

tab1:
LOAD
[Date of contract],
[Type of contract],
User,
rowno() as Sino
FROM

(ooxml, embedded labels, table is Лист1);

tab2:

load

*,

[Cont_Year]&''&[Type of contract]&''&User as Test;
load
User,
Year([Date of contract]) as [Cont_Year],
if([Test]=previous([Test]),'Old User','New User') as User_Status

Regards,

Jagan.

jyothish8807
Master II
Master II
Author

Hi jagan,

Thanks alot for your reply but now its saying

field not found Test.

I have added resident tab1 in the end.

Reagrds

KC

Best Regards,
KC
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

tab1:
LOAD
[Date of contract],
[Type of contract],
User,
rowno() as Sino
FROM

(ooxml, embedded labels, table is Лист1);

tab2:

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;

Regards,

Jagan.

jyothish8807
Master II
Master II
Author

Hi Jagan, Thanks alot.It worked.

I want to add an orber by User,Cont_Year line also.

Its again giving error.

And can you please tell me why you declared the custom fields like this?

Thanks & Regards

KC

Best Regards,
KC
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

tab1:
LOAD
[Date of contract],
[Type of contract],
User,
rowno() as Sino
FROM

(ooxml, embedded labels, table is Лист1);

tab2_Temp:

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;

tab2:

Noconcatenate

LOAD

*

FROM tab2_Temp

ORDER BY User,Cont_Year;

DROP TABLE tab2_Temp;

Regards,

Jagan.

jyothish8807
Master II
Master II
Author

Hi Jagan,

Its not getting ordered.

Regards

KC

Best Regards,
KC
Not applicable

Jyothish Kc The reason why you are getting that error is since qlikivew can only change the aliases only at run time. to resolve your use original name instead of aliases name and i strongly believe it should fix your issue.

jagan
Luminary Alumni
Luminary Alumni

tab1:
LOAD
[Date of contract],
[Type of contract],
User,
rowno() as Sino
FROM

(ooxml, embedded labels, table is Лист1);

tab2:

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];

Where you are trying to sort?  In script or in charts?

Regards,

Jagan.

jyothish8807
Master II
Master II
Author

In the script jagan, so that i can compare my rows using previous function and get an output.

Regards

KC

Best Regards,
KC