Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JuanMu
Contributor III
Contributor III

Operator AND

Hi All,
Anybody can explain me how I can configure two filter in a function?, I need to show a graph when the selection is a=1 and a=2, I'm trying if([a]=1,if([a]=2,OK,ko),ko) .How I can configure the operator AND?

Best regards,

Juan Muñoz.

1 Solution

Accepted Solutions
Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi @JuanMu 

I thought it was for the input for the action button. If you want to use it in Set Analysis you can simply type:

Count({<[Dificultad] = {'1','2'}>} [Dificultad])

The following will also work if they are numbers (top one should work for numbers and text):

Count({<[Dificultad] = {1,2}>} [Dificultad])

Have a look at this link for more info.

Hope this helps and have a great weekend. Stay safe!

Regards,

Mauritz

View solution in original post

6 Replies
Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi @JuanMu 

I am not sure how a field can have two values 🤔... Assuming you have field A and B then you can do the following:

=If(A=1 and B=2,'OK','ko')

You can obviously also use OR:

=If(A=1 or A=2,'OK','ko')

Hope this helps.

Regards,

Mauritz

JuanMu
Contributor III
Contributor III
Author

Hi Maurice,

A lot of thanks by your interest. Maybe I didn't explain me correctly, sorry.
For instance:
Table A have these values: 1,1,1,2,2,2,3,3,3

I need to indicate the Sum of values 1 and 2 = 6, in a function.

The idea is originated in the "Action":

Fig4.JPG

 

Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi @JuanMu 

Make the expression for Value in your screenshot ='1;2'

Hope this solves it👍!

Regards,

Mauritz

JuanMu
Contributor III
Contributor III
Author

 
 

Hi Mauritz,

The syntax it is correct:

Fig5.JPG

But not shows nothing, by separate it is ok, but with the ; symbol not works:

Fig6.JPG

 

Other way could be duplicate the same table with other name and select the two values, each one in different table, but I don't know the syntax correct:

Fig7.JPG

Any other idea?.

Best regards,

Juan Muñoz.

Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi @JuanMu 

I thought it was for the input for the action button. If you want to use it in Set Analysis you can simply type:

Count({<[Dificultad] = {'1','2'}>} [Dificultad])

The following will also work if they are numbers (top one should work for numbers and text):

Count({<[Dificultad] = {1,2}>} [Dificultad])

Have a look at this link for more info.

Hope this helps and have a great weekend. Stay safe!

Regards,

Mauritz

JuanMu
Contributor III
Contributor III
Author

Many thanks Mauritz!!!!! it is working properly, very interesting the link and very useful.

Best regards,
Juan Muñoz.