Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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,
How you are getting Yes and No. Would you please release clue
This
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:
Thank you for the reply, but this is a lengthy process when many rules are involved.
Please help me in adding this condition as a column in script.
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
Ad-Hoc Reports: Adhoc reporting in Qlikview
something like the attached.
please let me know if there is any other better way?
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
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.
Something like ...
Rule Result = Pick(RuleID, Rule1, Rule2, ...)
Rule1, Rule2, ... will replaced by your rule definition for the corresponding RuleID.