Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
Creator II
Creator II

Create a Flag in Script based on Condition

I have data in the following way

 

ID        CatID      Status               Flag   (Expected Field)

1           1A          Pending            Complete/Pending

1            1B         Complete         Complete/Pending

2            2A          Complete         Complete

3            3A          Pending             Pending

3            3B           Pending            Pending

3           3C            Pending             Pending

4            4A            Complete          Complete

5             5A           Pending          Complete/Pending

5              5B           Complete      Complete/Pending

 

I need to create a new field called 'Flag' that says 'Complete/Pending' for the IDs that has both 'Pending' and 'Complete' in Status. If the ID has only one value in the Status field, then show the same Status value in the 'Flag'

How do I do this in the script?

 

Labels (2)
1 Solution

Accepted Solutions
Marcos_rv
Creator II
Creator II

Try this :

TABLE1:

LOAD ID, 

CatID,

Status

from XXXXX.QVD;

LEFT JOIN (TABLE1)

load ID,

Concat(distinct Status ,'-' ) as Flag

resident TABLE1;

 

Saludos!!!

View solution in original post

5 Replies
Marcos_rv
Creator II
Creator II

Try this :

TABLE1:

LOAD ID, 

CatID,

Status

from XXXXX.QVD;

LEFT JOIN (TABLE1)

load ID,

Concat(distinct Status ,'-' ) as Flag

resident TABLE1;

 

Saludos!!!

qlikwiz123
Creator II
Creator II
Author

Says Invalid Expression

qlikwiz123
Creator II
Creator II
Author

Needed to Group By. Will try. Thanks

Anil_Babu_Samineni

PFA

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Marcos_rv
Creator II
Creator II

yep, 

group by ID;

 

Very close !! jajaja