Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor III

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
Highlighted
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);

View solution in original post

1 Reply
Highlighted
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);

View solution in original post