Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If Statements

HI I am new to Qlikview. i am setting up my project.

i need to put if statement in my condition like this;

If(WorkerType='Employee', AND(EmployeeType='Regular','Probationary',),1,0)

how to write this condition in Qlikview.

Thanks.

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Try,

If(WorkerType='Employee' And Match(EmployeeType='Regular','Probationary'),1,0)

If(WorkerType='Employee' And Match(EmployeeType, 'Regular','Probationary'),1,0)


Sorry for the typo error.

View solution in original post

9 Replies
tamilarasu
Champion
Champion

Try,

If(WorkerType='Employee' And Match(EmployeeType='Regular','Probationary'),1,0)

If(WorkerType='Employee' And Match(EmployeeType, 'Regular','Probationary'),1,0)


Sorry for the typo error.

Not applicable
Author

Hi Nagaraj Thanks !!

I tried but it gives me 0 Values. any reason why? i will explain what i need;

I have two type like 1st Worker Type :- Employee or Contingent Worker

then in sub category i have Employee Type :- Regular, Probationary, Fixed Term Contract.

for Employee HC i have to put both condition like Worker Type should be only Employee and Employee type should be Regular and Probationary to get exact Employee count.

pooja_sn
Creator
Creator

If(match(WorkerType,'Employee') AND match(EmployeeType,'Regular','Probationary',) ,1,0)

Anonymous
Not applicable
Author

Hi Srikant,

Hope this will work.....

if((WorkerType='Employee'  and Match(EmployeeType,'Regular','Probationary')>0,1,0)

Regards

Nitin

Not applicable
Author

you  can Use Either of the two :

  If (WorkerType='Employee' and (EmployeeType='Regular' or EmployeeType='Probationary') ,1,0)

or

If(WorkerType='Employee' And Match(EmployeeType, 'Regular','Probationary'),1,0)

Regards,

Anjali Gupta

Anonymous
Not applicable
Author

Use mixmatch, it will work too..


if((WorkerType='Employee'  and MixMatch(EmployeeType,'Regular','Probationary')>0,1,0)

Not applicable
Author

Thanks Anjali it works! second option...

Not applicable
Author

Thanks it works

Not applicable
Author

Good to know.. That it helped you..!!