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,
what if the Rule ID is a string
You are using different condition for every rule .so , I think you need to do it manually for every rule.Lets see few more solutions coming up .
Use the Match function along with Pick
Pick(
Match(RuleID, ' ... ID of First Rule Here ... ', , ' ... ID of Second Rule Here ... ', ...),
, Rule1, Rule2, ...)
Hi
You can try this but this is not much efficient solution for your problem.
Rule:
LOAD A,
B,
[Rule ID],
if(A='0','Yes','No') as RuleResult
FROM
(ooxml, embedded labels, table is Data)
where [Rule ID] = '1';
LOAD A,
B,
[Rule ID],
if(B='0','Yes','No') as RuleResult
FROM
(ooxml, embedded labels, table is Data)
where [Rule ID] = '2';