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

And condition between two Input boxes

I am trying to create a report in which I am using two input box. Created two variables for them which are being used by two expressions.

When I use one input box the result for the relevant express is correct. But we I use both othem to gether result is not correct.

What I mean to say is for example:

Input box 1  >= 5

Input box 2 >=15

Now result will come in this form

Expression 1    Expression 2   
80
50
018
0134

When I just use one expression then it gives me the right answer, the  values which are infact >= that value. In case of both input boxes used to gether condtion is fullfiled then other shows 0 and vice versa.

Am I missing somehting here?

Can someone help me on this on urgent basis?

Thanks,

TA

12 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

I think you need to use OR

If ( [Input box 1]  >= 5 Or [Input box 2] >=15, 1, 0 )

Greetings from Munich

Martina

Not applicable
Author

Danke schon fuer dein Antwort... (Auf Deutsch):-)

But I am not sure if you understood my problem correctly.

I want only those records which fulfill the condition of input box 1 and input box 2.

Regarding your answer where should i use this if condition in my expression or somewhere else?

Sorry for Dum questions.

TA from New York

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi TA from NYC,

there does not exist any Dum questions, only dum answers!

Pardon, but if you use inputboxes so you enter variables, these you can use in every expression, p.e.

Inputbox 1: variable1

Inputbox 2: variable2

Expression: If($(variable1)>=5 And $(variable2)>=15, TRUE, FALSE)

Greetings from Munich und schönes Wochenende

Martina

Not applicable
Author

Martina,

Thanks for your quick reply.

You are right I am using two variables and two expressions.

Are you suggesting only one expression?

In fact I need two expressions to show the values as well.

I wnat to show the records which fulfill both condtions along with actual values.

For some reason I can not attach the image. But I hope you understood what I am looking for.

If you can asnwer this then my Wochenende will be richtig schoen!

TA

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, TA,

I hope the little example attached is saving your weekend!

Nice greeting to NYC

Martina

Not applicable
Author

mmmmm 😞

I am sorry Martina but I think this is not what I want if I am not wrong.

I want to use two expression in a table. like this:

ID     Name     eMail     Exp1     Exp2

1          TA          ta@..     5               12

2          TB          tb@..     6               11

2          TC          tc@..     8              20

This is type of output table which I want. Expressions are based on two variables

Expression 1: SUM ({<PAGEVIEW_COUNT={">$(Variable1)"}>}PAGEVIEW_COUNT)

Expression 2: SUM ({<PAGEVIEW_COUNT_Last4Week={">$(Variable2)"}>}PAGEVIEW_COUNT_Last4Week)

When I use these expression individually they work perfectly. Give me the right resutls. But when I use both of them together, only one conditon is fulfilled and other one not.

I want the results which fulfil both condtions like Variable 1 >=5  and at the same time Varibale2>=10

How  can I update my expressions so I can get the required result.

I am sorry if I am confusing 😞 but I really want to save my weekend. 🙂

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, TA,

but your expression works fine? Pardon, but I do not understand your problem, could you attach an example?

Greetings from Munich

Martina

Not applicable
Author

This is what I get why I apply these input boxes. I want to see the user who have page view count values (first expression) >=5  And Page viewcount second expression >=15

Input boxes question on Qlikview Community.png

Not applicable
Author

Can some one help me out and save my weekend?