Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for
Did you mean:  Creator

## IF WITH AND AND OR

Hi,

I have three regions EU, AP and NA and two employee types PERM and TEMP.

Now if Employee type is Perm and Region is EU or AP then we should get X

if Employee type is Perm and Region is EU or AP or NA then we should get Y

if Employee type is Temp then we should get Z.

Can some one provide a possible if condition for this in front end in a text box.

Labels (2)

• ### QlikView Applications

1 Solution

Accepted Solutions  Creator
Author

It can be solved this way: where SR is Special Region

If([Emp Type] = 'Perm',
If(Concat(Distinct SR) = 'APEUNA' or Concat(Distinct SR) = 'APNA' or Concat(Distinct SR) = 'EUNA' or Concat(Distinct SR) = 'NA' , 'Y',
If(Concat(Distinct SR) = 'APEU'or Concat(Distinct SR) = 'EU' or Concat(Distinct SR) = 'AP'  , 'X') ),
'Z')

3 Replies  MVP
Hi, if you can assign only X, Y or Z, you need to review the conditions for Y, if type is perm and region is EU or AP, it's X and Y?, anyway, it could be something like
If(EmpType='TEMP', 'Z',
If(Match(Region,'EU','AP'), 'X', 'Y'))  Creator
Author

It can be solved this way: where SR is Special Region

If([Emp Type] = 'Perm',
If(Concat(Distinct SR) = 'APEUNA' or Concat(Distinct SR) = 'APNA' or Concat(Distinct SR) = 'EUNA' or Concat(Distinct SR) = 'NA' , 'Y',
If(Concat(Distinct SR) = 'APEU'or Concat(Distinct SR) = 'EU' or Concat(Distinct SR) = 'AP'  , 'X') ),
'Z')  MVP
That's a different condition, finally you are asking if region has NA, in that case is Y. If doesn't have NA but has AP or EU then is X. Community Browser