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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Michiel_QV_Fan
Specialist
Specialist

Link table results in synthetic key

Hi,

I created this script but it doesn't result in a link table but it results in a synthetic key.

I don't understand why.

The content of the fields are exactly the same.

Thanks for you help.

Script:

LinkTable:

load Distinct

    BudgetKey,

    year(AddMonths(OrderDate, $(vFiscalOffset))) as BudgetYear,

    ceil(month(AddMonths(OrderDate, $(vFiscalOffset)))/3) as BudgetQuarter,

    if(EmployeeBusinessEntityID = 'Website', -1, num#(EmployeeBusinessEntityID)) as Budgetholder

Resident SalesOrders2;

Concatenate (LinkTable)

load Distinct

    BudgetKey,

    BudgetYear,

    BudgetQuarter,   

    Budgetholder

Resident Budgets;

1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

try this

qualify * ;

Unqulify BudgetKey;

Load

BudgetKey,

    BudgetYear,

    BudgetQuarter,   

    Budgetholder

Resident Budget;

Unqualify*;

Sunil Chauhan

View solution in original post

3 Replies
SunilChauhan
Champion II
Champion II

try this

qualify * ;

Unqulify BudgetKey;

Load

BudgetKey,

    BudgetYear,

    BudgetQuarter,   

    Budgetholder

Resident Budget;

Unqualify*;

Sunil Chauhan
its_anandrjs
Champion III
Champion III

Hi,

You have to link it with Budgetholder so unqualify Budgetholder  and reset of tables qualify

LinkTable:

load Distinct

    BudgetKey,

    year(AddMonths(OrderDate, $(vFiscalOffset))) as BudgetYear,

    ceil(month(AddMonths(OrderDate, $(vFiscalOffset)))/3) as BudgetQuarter,

    if(EmployeeBusinessEntityID = 'Website', -1, num#(EmployeeBusinessEntityID)) as Budgetholder

Resident SalesOrders2;

qualify * ;

Unqulify Budgetholder;

Load

BudgetKey,

    BudgetYear,

    BudgetQuarter,  

    Budgetholder

Resident Budget;

Unqualify*;

Rgds

Anand

Michiel_QV_Fan
Specialist
Specialist
Author

its.anandrjs answer:

This resulted in 2 synthetic keys.

Despite that, thanks for the help