Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
grajmca_sgp123
Creator
Creator

Flag creation in Script

Hi Experts,

I would like to create one new flag with values Available/Over Booked.

Here below is my requirement .

If any one of project "duration" field is negative , I would like to create Flag value as "Over Booked" for whole set of Technology. If "duration" field has all positive values flag value should be "Available" for whole set of Technology.

Let me how can we achieve this requirement.

   

TechnologyProject durationAvailable/Over BookedFlag(required field)
JavaA5AvailableAvailable
B10Available
C1Available
CX-5Over BookedOver Booked
Y4Available
Z0Available
P4Available

Thanks in advance.

2 Replies
marcus_sommer

Maybe in this way:

t:

load Technology, Project, duration from YourSource

     left join (t)

load Technology, if(min(duration)<0, 'Over Booked', 'Available') as Flag

resident t group by Technology;

- Marcus

Gysbert_Wassenaar

Perhaps like this:

MyTable

LOAD

     Technology,

     Project,

     duration,

     If(duration >= 0, 'Available', 'Over Booked') as [Available/Over Booked]

FROM

     ...source data....

     ;

JOIN (MyTable)

LOAD

     Technology,

     If(Min(duration)<0, 'Over Booked', 'Available') as [Flag (required field)]

RESIDENT

     MyTable

GROUP BY

     Technology

     ;


talk is cheap, supply exceeds demand