Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

bill_priddy
New Contributor II

Join or Concatenate or Both

I have an issue where we some fact tables all associated around Employee Data.  The tables are Actives, Departures, Transfers.  The data has data in in that is repeated in each.  IE Name, ID, Etc but each table represents different data.

Would the recommended way be to use join or concatenate these all into one table?  Should this all be stacked into one fact table or have fields renamed to avoid the synthetic keys?  Open to suggestions/questions.  Thanks!

Here is sample of my script as it is right now:

Actives:

LOAD *, 'Actives' as SRCTABLE;

SQL SELECT "EMP_ID",

    "EE_NAME",

    "ORG_HIRE_DT",

    "REHIRE_DT",

    "ADJ_HIRE_DT",

    "EE_TYPE",

    "CST_CTR_ID",

    "DPT_NM",

    "JOB_TITLE",

    "JOB_CODE",

    "PSTN_NUM",

    "SUP_ID",

    "SUP_NM",

    BLDG,

    BU,

    "EML_ADDR",

    MAILCODE,

    YYYYMM

FROM BDA.dbo."HR_ACTIVES";

Departures:

LOAD *, 'Departures' as SRCTABLE;

SQL SELECT YYYYMM,

    "EMP_ID",

    "EE_NAME",

    "ORG_HIRE_DT",

    "REHIRE_DT",

    "DEPART_DT",

    "EE_TYPE",

    "CST_CTR_ID",

    "DPT_NM",

    "JOB_TITLE",

    "JOB_CODE",

    "PSTN_NUM",

    "SUP_ID",

    "SUP_NM",

    BLDG,

    BU

FROM BDA.dbo."HR_DEPARTURES";

1 Solution

Accepted Solutions
Not applicable

Re: Join or Concatenate or Both

Hello bill,

You can concatenate the 3 tables (Actives, Departures, Transfers) but also add a flag (name it for example Flag_Table)

and give each table a different flag ( for Actives table "Active" and so on).

Can you upload the qvf you are working on?

Rima

3 Replies
Not applicable

Re: Join or Concatenate or Both

Hello bill,

You can concatenate the 3 tables (Actives, Departures, Transfers) but also add a flag (name it for example Flag_Table)

and give each table a different flag ( for Actives table "Active" and so on).

Can you upload the qvf you are working on?

Rima

bill_priddy
New Contributor II

Re: Join or Concatenate or Both

I believe I may have solved this on my own:

Concatenate(Actives)

Load * Resident Departures;

Drop Table Departures;

bill_priddy
New Contributor II

Re: Join or Concatenate or Both

Thanks for the quick response I figured this out but you were so quick to respond wanted to be sure you got credit:

I used this video to help:  Concatenate Multiple Fact Tables - How to manage the QlikView data model - Part 2 - YouTube