Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
QVUser1
Partner - Contributor III
Partner - Contributor III

If Condition at Script Level

Hi All,

I need to derive field name STATUS at Script level.

Where the condition should be derived based on :

If  an Employee is Review by his manager  on weekly  basis . if his rating is good or bad for that it should be BAD . if it is GOOD then it is GOOD ,If it is BAD it should be BAD.

Note: If weekly Review once  falls  under BAD then it is BAD .

WeekEMP IDReview by ManagerStatus
23AGOODBAD
23AGOODBAD
23ABADBAD
24AGOODGOOD
24AGOODGOOD
24AGOODGOOD
3 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hi,

Quite not clear about the condition. Could you please elaborate the condition ?

QVUser1
Partner - Contributor III
Partner - Contributor III
Author

If a employee is review by his manager as bad then status is BAD .

If We check from the above data Week23 employee is review by his manager is good ,good ,bad . then status should be bad .

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

May be you can take a count of 'BAD' aggregating on EmpID and Weekly basis.

If that count is greater than 1, you can mark status of that employee as 'BAD'.

E.g 

=If(Aggr(Count({<[Review by Manager] = {'BAD'}>}[Review by Manager]),[EMP ID], Week)>0,'BAD','GOOD')

AshutoshBhumkar_0-1630928946307.png