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: 
Not applicable

rename empty fields en look to other tables

Can someone tell me what's wrong with my 2 codes:

Select
"departement_name"
"line_of_business"
from table1;

Select
"departement_number"
from table2;

if ("table2.departement_number"= '', '4000', "table2.departement_number")
//Some departements have no departement_numbers, and I wish to give them those the number 4000 automaticly within Qlikview//

if ("table1.line_of_business"= 'sales', '1000', as "table2.departement_number")
//Every sales departement must be shown with a 1000 departement number//

thx in advace











3 Replies
Not applicable
Author

How is this?

Select
departement_name,
line_of_business,
if(departement_number ='','4000',if(line_of_business='sales',1000,departement_number)) as DEP_NO
from table1 a
left outer join table2 b
on a.departement_name=b.departement_name;

-- Arun

Not applicable
Author

Nope, does not work. Maybe if we split it into 2 seperate codes?

Not applicable
Author

Hi,

The code given is nly the SQL . You can assocoate this with load. Whether the keys which I used are corerct as per your structure? If so, it should work.

_Arun