Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

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
Highlighted

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

Highlighted
Not applicable

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.

Highlighted
Creator
Creator

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

Highlighted
Specialist II
Specialist II

Hi Srikant,

Hope this will work.....

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

Regards

Nitin

Highlighted
Not applicable

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

Highlighted
Contributor II
Contributor II

Use mixmatch, it will work too..


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

Highlighted
Not applicable

Thanks Anjali it works! second option...

Highlighted
Not applicable

Thanks it works

Highlighted
Not applicable

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