Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

brijesh1991
Contributor III

Flag Creation in script

Hi all,

I wanted to create a flag at script level.
My data is like this:
Load * inline
[
AppNo, Date
123, 12/11/2013
123,
124,12/10/2012
124, 10/05/2012
125,
125
126,10/12/2012
];

There are multiple dates against a single AppNo, I wanted to create a flag against AppNo. if any one Date is null against AppNo, then Flag=N else Y

So my output should be like this:

AppNo, Date, Flag
123, 12/11/2013, N
123,                  ,N
124,12/10/2012, Y
124, 10/05/2012, Y
125,                  , N
125                  , N
126,10/12/2012, Y

Your help is valuable to me. . .

Best Regards,
BRIJESH

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Flag Creation in script

PFA.

Is this what you want?

5 Replies
MVP
MVP

Re: Flag Creation in script

try this:

Load

          AppNo,

          Date,

          If (Isnull(Date), 'N', 'Y') as Flag

From  <>;

brijesh1991
Contributor III

Re: Flag Creation in script

thanks tres qv. . .

AppNo, Rcvd
123, 12/11/2012
123,
Since there are multiple dates against each AppNo, for above case your solution will give flag 'Y'. Actually it should be 'N' I think we need to do some group by. but getting some script error. Try from your end and let me know if u find some fruit! Best Regards, Brijesh

Not applicable

Re: Flag Creation in script

Hi,

See the attachment.

MVP
MVP

Re: Flag Creation in script

PFA.

Is this what you want?

brijesh1991
Contributor III

Re: Flag Creation in script

Hey tres. .. . This is exactly what I was looking for. . . Thanks buddy and FindOneOf is nice function at time of deriving such complicated Flag. . . Really impressed. . . Thanks again. . . Brijesh Smiley Happy)

Community Browser