Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

vidyasagar159
Contributor

Dont create Synthetic Key between two tables

Hi,

I two requirements from one QVD called TEST.QVD.

1. [TEST_ONE]:

LOAD

firstname,

lastname,

mobilenumber,

company,

managername

from [TEST.QVD]

where managername <> null and company<> 1234

I am getting 50 records from this table

2. [TEST_TWO]:

LOAD

firstname,

lastname,

mobilenumber,

company,

managername

from [TEST.QVD]

I am getting 100 records from this table.

This two data tables load into single APP. One for sheet1 another for Sheet2. But the Problem is by default synthetic key is creating between these two table and because of that second table loading with only 50 records. Please guide me with the better approach.

Thanks,

-Vidya

1 Solution

Accepted Solutions
jschrader
New Contributor III

Re: Dont create Synthetic Key between two tables

Can you concatenate both tables together with an extra field in each table called Test? The first table for test loads One and the second table loads Two. Then, you can use set analysis to separate test one from test two.

[TEST_ONE]:

LOAD

firstname,

lastname,

mobilenumber,

company,

managername,

'Test_One' as Table

from [TEST.QVD]

where managername <> null and company<> 1234;

Concatenate

LOAD

firstname,

lastname,

mobilenumber,

company,

managername,

'Test_Two' as Table

from [TEST.QVD];

for first page

sum({<Table = {'Table_One'}>}Value)

for second page

sum({<Table = {'Table_Two'}>}Value)

5 Replies
vidyasagar159
Contributor

Re: Dont create Synthetic Key between two tables

I know I am doing the bad process. At least this method is not creating any synthetic keys between the tables. All I am doing is changing the column names of the second table.

In the performance point of view I am loading 150 records overall.

zebhashmi
Valued Contributor

Re: Dont create Synthetic Key between two tables

Do you want data in one table all 150?

if yes

1. [TEST_ONE]:

LOAD

firstname,

lastname,

mobilenumber,

company,

managername

from [TEST.QVD]

where managername <> null and company<> 1234

LOAD

firstname,

lastname,

mobilenumber,

company,

managername

from [TEST.QVD]

jschrader
New Contributor III

Re: Dont create Synthetic Key between two tables

Can you concatenate both tables together with an extra field in each table called Test? The first table for test loads One and the second table loads Two. Then, you can use set analysis to separate test one from test two.

[TEST_ONE]:

LOAD

firstname,

lastname,

mobilenumber,

company,

managername,

'Test_One' as Table

from [TEST.QVD]

where managername <> null and company<> 1234;

Concatenate

LOAD

firstname,

lastname,

mobilenumber,

company,

managername,

'Test_Two' as Table

from [TEST.QVD];

for first page

sum({<Table = {'Table_One'}>}Value)

for second page

sum({<Table = {'Table_Two'}>}Value)

vidyasagar159
Contributor

Re: Dont create Synthetic Key between two tables

Thanks for looking into this.

Actually, I need 50 records from the first table and 100 records from the second table.

vidyasagar159
Contributor

Re: Dont create Synthetic Key between two tables

Thank you. This logic helped me.

Community Browser