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

If statement questions

Hi QlikView Peers,

I need help with following statement. I was able to change "Legal" to "Global Functions - Other" but somehow the script isn't able to include  "Compliance & Control" to "Global Functions - Other". Please help.


     IF([Primary Sector Impacted_1]='CC-Staff' and [Primary Business Impacted]='Legal' OR 'Compliance & Control', 'Global Functions - Other')

Thanks,


Jasmine

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

You cant use the OR like you are using it, you would have to specify [Primary Business Impacted] = 'Compliance & Control' again.

Try this if statement:

IF([Primary Sector Impacted_1]='CC-Staff' and ([Primary Business Impacted]='Legal' OR [Primary Business Impacted] = 'Compliance & Control'), 'Global Functions - Other')


or you could use the match function:


IF([Primary Sector Impacted_1]='CC-Staff' and match([Primary Business Impacted], 'Legal', 'Compliance & Control'), 'Global Functions - Other')


Hope this helps!

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Please try:

  IF([Primary Sector Impacted_1]='CC-Staff' and [Primary Business Impacted]='Legal' OR [Primary Business Impacted]= 'Compliance & Control', 'Global Functions - Other')


thanks

Yaniv

jerem1234
Specialist II
Specialist II

You cant use the OR like you are using it, you would have to specify [Primary Business Impacted] = 'Compliance & Control' again.

Try this if statement:

IF([Primary Sector Impacted_1]='CC-Staff' and ([Primary Business Impacted]='Legal' OR [Primary Business Impacted] = 'Compliance & Control'), 'Global Functions - Other')


or you could use the match function:


IF([Primary Sector Impacted_1]='CC-Staff' and match([Primary Business Impacted], 'Legal', 'Compliance & Control'), 'Global Functions - Other')


Hope this helps!

Anonymous
Not applicable
Author

IF([Primary Sector Impacted_1]='CC-Staff' and match([Primary Business Impacted],'Legal', 'Compliance & Control'), 'Global Functions - Other')

Not applicable
Author

Thank you for your quick responses.