Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

hkg_qlik
Contributor II

Add Flag

Hi,

I have a QVD file to which I need to add a FLAG (Yes/No).

The rule for the flag is if(Balance) >= 0 or Null  than Flag = No and if(Balance) <0 than Flag = Yes.

Thanks,

H

1 Solution

Accepted Solutions
nagaiank
Valued Contributor III

Re: Add Flag

Assuming that "Balance" is a fieldname in the QVD and "Flag" as the fieldname to be added, try the following code:

LOAD *, If(IsNull(Balance) or Balance >= 0,'No','Yes') as Flag;

LOAD * from Your.qvd (qvd);

1 Reply
nagaiank
Valued Contributor III

Re: Add Flag

Assuming that "Balance" is a fieldname in the QVD and "Flag" as the fieldname to be added, try the following code:

LOAD *, If(IsNull(Balance) or Balance >= 0,'No','Yes') as Flag;

LOAD * from Your.qvd (qvd);

Community Browser