# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for
Did you mean:
Creator II

## Find values according to conditions in a different column

Hi All,

I would like to automate the process of checking values against conditions. I have a set of values and conditions on them in two separate tables(Data and Rule in the attached). The conditions check if the columns are blank, zero... (the attached has a subset of the rules).

I would like to arrive at a result of the rule for every row in the data set according to the rule id in that row.

Result should be :

 A B Rule ID Rule Result 0 0 1 yes 0 0 2 yes 0 1 1 yes 0 1 2 no 1 0 1 no 1 0 2 yes 1 1 1 no 1 1 2 no

Please do help me out with this,

13 Replies

How you are getting Yes and No. Would you please release clue

This

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anonymous
Not applicable

use a staright table with Dimension A,B, RUle ID and

Expression:

=If ([Rule ID]=1, if (A = 0, 'yes', 'no'),
if ([Rule ID]=2, if (B = 0, 'yes', 'no')))

Result:

Creator II
Author

Thank you for the reply, but this is a lengthy process when many rules are involved.

Creator II
Author

The yes and no is in the condition itself. When checking the condition is A zero we check A and say yes if zero.

Still confusing what are you expecting. Does Attachment is working or not as you expected.

Or you are looking

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Creator II
Author

something like the attached.

please let me know if there is any other better way?

Master

Hi Anagha,

Your logic seems to boils down to

Rule Result = Rule1*(1-A) + Rule2*(1-B)

Rule Result =  Pick(RuleID,1-A,1-B)  EDIT

returning 0 for no and 1 for yes.

Cheers

Andrew

Creator II
Author

Thank you for the reply, but these are just dummy values.. there might be values other than 1,0 and also conditions checking dates and strings.

Master

Something like ...

Rule Result =  Pick(RuleID, Rule1, Rule2, ...)

Rule1, Rule2, ... will replaced by your rule definition for the corresponding RuleID.

Community Browser