Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Insider: SaaS capabilities for Data Integration and Analytics, May 25th! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
LLing
Creator
Creator

Load table containing rows with missing key

Hi,

I have Table A with fields CompanyKey and CompanyName that is pulled using a left keep to the Fact Table. The common field between the 2 tables is CompanyKey.

There are some CompanyKey that are present in the Fact Table but missing in Table A. I want all CompanyKey in the Fact Table to have a row in Table A. Those that do not have a link will have CompanyName as N/A. 

This is what I have.

TableA:

Left Keep (TableFact)
LOAD Distinct CompanyName,
CompanyKey;
From Source;

How can I modify my script to achieve this in load? Can someone help me please. Thank you.

1 Solution

Accepted Solutions
anat
Specialist II
Specialist II

can u try some what like below:

dim:
LOAD * Inline [
id,dept
1,asd
];

Fact:
LOAD id,'n/a' as dept;
LOAD * Inline [
id,name,sal
1,as,100
2,we,200
] Where not Exists(id,id);


Right Keep(dim)
Fact1:
LOAD * Inline [
id,name,sal
1,as,100
2,we,200

];

View solution in original post

2 Replies
anat
Specialist II
Specialist II

can u try some what like below:

dim:
LOAD * Inline [
id,dept
1,asd
];

Fact:
LOAD id,'n/a' as dept;
LOAD * Inline [
id,name,sal
1,as,100
2,we,200
] Where not Exists(id,id);


Right Keep(dim)
Fact1:
LOAD * Inline [
id,name,sal
1,as,100
2,we,200

];

LLing
Creator
Creator
Author

Hi @anat ,

Your solution works. Thank you.