Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

master calender error,here am write a correct syntax, the code is shown in below

in this code the tab2 table removed to be the code is correct but i want  tab2 tables so pls find out the error

tab:

LOAD id,name,sal,date(date(doj,'dd-mm-yyyy')) as doj Inline [

id,name,sal,doj

1,sri,5000,12-12-2010

2,ram,6000,12-12-2011

1,sati,7000,12-12-2012

1,vam,8000,12-12-2013

1,kittu,9000,12-12-2014

];

tab2:

LOAD * Inline [

id,prod,sales

1,a,500

2,b,600

3,c,700

4,d,750

5,a,100

6,b,100];

sort:

LOAD * Resident tab Order By doj;

LET max=Num(Peek('doj',-1,'sort'));

LET min=Num(Peek('doj',0,'sort'));

temp:

LOAD Date($(min)+RecNo()-1) as tempdate

AutoGenerate($(max)-$(min)+1);

cal:

LOAD tempdate as doj,

    Year(tempdate) as year,

    Month(tempdate) as month,

    'Q'&Ceil(Month(tempdate)/3) as qtr

    Resident temp;

   

    DROP Tables temp;

3 Replies
sunny_talwar

Try it will Upper case DD-MM-YYYY

tab:

LOAD id,name,sal,Date(Date#(doj,'DD-MM-YYYY')) as doj Inline [

id,name,sal,doj

1,sri,5000,12-12-2010

2,ram,6000,12-12-2011

1,sati,7000,12-12-2012

1,vam,8000,12-12-2013

1,kittu,9000,12-12-2014

];

er_mohit
Master II
Master II

Hi Try this

tab:

LOAD id,name,sal,date(date#(doj,'DD-MM-YYYY')) as doj Inline [

id,name,sal,doj

1,sri,5000,12-12-2010

2,ram,6000,12-12-2011

1,sati,7000,12-12-2012

1,vam,8000,12-12-2013

1,kittu,9000,12-12-2014

];

tab2:

LOAD * Inline [

id,prod,sales

1,a,500

2,b,600

3,c,700

4,d,750

5,a,100

6,b,100];

sort:

NoConcatenate

LOAD * Resident tab Order By doj ;

DROP Table tab;

LET max = Floor(Peek('doj',-1,sort));

Let min = Floor(Peek('doj',0,sort));

//

temp:

LOAD Date($(min)+RowNo()-1) as tempdate

AutoGenerate $(max)-$(min)+1;

cal:

LOAD Date(tempdate,'DD-MM-YYYY') as doj,

    Year(tempdate) as year,

    Month(tempdate) as month,

    'Q'&Ceil(Month(tempdate)/3) as qtr

    Resident temp;

  

DROP Tables temp;

Thanks

Mohit

Not applicable
Author

here is the tables are joined ,am try to concatenate between tab & tab2 tables the code will be correctly but why we are using noconcatenate qualifier,