Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Which joins to which and what type of join?

Hello guys,

I'm a little bit of blurry on the JOIN part. Say I have two table as pictured below:

The table Calendar contains the FiscalYear, FiscalMonth and Days.

Table Revenue might not have all of the revenue of a particular Fiscal Year and FiscalMonth.

To which table must a table join and what type of join must I use to derive the table Revenue1?

Thank you for your kind attention guys. Appreciate any suggestions/opinions and advices on this one. Thanks guys

1 Solution

Accepted Solutions
anbu1984
Honored Contributor III

Re: Which joins to which and what type of join?

Calendar:

LOAD * Inline [

FiscalYear,FiscalMonth,Days

2014,Jan,xx

2014,Feb,xx

2014,Mar,xx

2014,Apr,xx

2014,May,xx ];

Left Join(Calendar)

Revenue:

LOAD * Inline [

Country,FiscalYear,FiscalMonth,Amount

A1AUS,2014,Jan,yy

A1AUS,2014,Feb,yy

A1AUS,2014,Apr,yy ];

NoConcatenate

Calendar_Final:

Load FiscalYear,FiscalMonth,Days,Amount,If( IsNull(Country),Previous(Country),Country) Resident Calendar;

Drop table Calendar;

View solution in original post

3 Replies
anbu1984
Honored Contributor III

Re: Which joins to which and what type of join?

Calendar:

Load * From Calendar;

Left Join(Calendar)

Load * From Revenue;

NoConcatenate

Calendar_Final:

Load *,If( IsNull(Country),Previous(Country),Country) Resident Calendar;

Drop table Calendar;

anbu1984
Honored Contributor III

Re: Which joins to which and what type of join?

Calendar:

LOAD * Inline [

FiscalYear,FiscalMonth,Days

2014,Jan,xx

2014,Feb,xx

2014,Mar,xx

2014,Apr,xx

2014,May,xx ];

Left Join(Calendar)

Revenue:

LOAD * Inline [

Country,FiscalYear,FiscalMonth,Amount

A1AUS,2014,Jan,yy

A1AUS,2014,Feb,yy

A1AUS,2014,Apr,yy ];

NoConcatenate

Calendar_Final:

Load FiscalYear,FiscalMonth,Days,Amount,If( IsNull(Country),Previous(Country),Country) Resident Calendar;

Drop table Calendar;

View solution in original post

Not applicable

Re: Which joins to which and what type of join?

Hi Anbu,

Thank you for your reply. Really appreciate it Have a nice day!