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

How to get Button working with 2 conditions

Hello there,

I try to create a button with an action that it will show the relevent result when condition 1 & 2 both fufilled. But it is not working.

I didn't set up anything under "General".

Under "Actions", I created an new variable called "VariableEvent". I created a value is " ([Date]) = True && [Value] = '1 ".

Condition 1: [Date] is one of my data fields with date format as its value. What I try to do is when the Date field exsit and have value in it (=True), then searching for condition 2.

Condition 2: [Value] only contain '0, 1 and 2'.

I am not sure how to get this work. Can anyone with more experience provide me some hint?

Thanks in advance,

Becky

6 Replies
sunny_talwar

May be this:

If(GetSelectedCount(Date) > 0 and Value = 1, .....)

Kushal_Chawda

=if(not isnull(Date) and match(Value,'0','1','2'),1,0)

Not applicable
Author

Thanks Sunny. There is a error after I typed " ) "  at the end of the line.

=if(GetSelectedCount([Date])>0 and [value] = 1)

Not applicable
Author

Can you kindly let me know what does this mean?

if (Date) is not null, and when Value match....??

Thanks, Kushal.

krishna_2644
Specialist III
Specialist III

Please check my post on buttons.

https://community.qlikview.com/docs/DOC-8398

sunny_talwar

You did not specify the value you are setting your variable:

If(GetSelectedCount(Date) > 0 and Value = 1, 1)

Replace 1 with whatever value you want in place of 1 when the statement is true