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

Adding new field & Where After Binary

Hi All,

after Binary call I would like to create a new field and then use it inside "Where" 

i tried this:

NoConcatenate
Sales2:
Load

*,

if(Sales.Brand = 'SM', '1', '0') as "Co Flag"

Resident Sales;

NoConcatenate
Sales3:
load *

resident Sales2

where "Co Flag" = '1';
drop Tables Sales3,Sales2;

but it does not work, can someone help me understand why?

 

 

Labels (3)
1 Reply
BrunPierre
Partner - Master II
Partner - Master II

Hi, it appears you dropping the output table. I'd rather you do it as below.

NoConcatenate
Sales2:
LOAD *
Where "Co Flag" = 1 ;

Load * ,
if(Sales.Brand = 'SM', '1', '0') as "Co Flag"

Resident Sales;

DROP Table Sales;