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
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.
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.
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
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.
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
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.
Hi Jagan,
Its not getting ordered.
Regards
KC
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.
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.
In the script jagan, so that i can compare my rows using previous function and get an output.
Regards
KC