Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vidyasagar159
Creator II
Creator II

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
Contributor III
Contributor III

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)

View solution in original post

5 Replies
vidyasagar159
Creator II
Creator II
Author

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
Specialist
Specialist

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
Contributor III
Contributor III

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
Creator II
Creator II
Author

Thanks for looking into this.

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

vidyasagar159
Creator II
Creator II
Author

Thank you. This logic helped me.