I have one Scenario to achieve,Please find the screen shot for the same. KIndly assist me on this.
I think that should work for your first 3 rules. I’m not sure I understand the 4th one, but it looks like just the overall (ungrouped) sum.
I think you can do that with
Basically one Rule Engine for each of your rules, then use the groupby node to Aggregate the value of each sum
Maybe lastly use math formula for the rule4
Thank u for the response ,I have achieved the scenario for first three rules but for the fourth rule i am unable to write it in rule engine.How math formula Node can help here .Fourth rule is the aggregation of the above three rule only.How can i write it in rule engine?
It would be really helpful if You guys will help.
after you created the first 3 rules, use the Math Node to Aggregate the values with thr Results of Rule1+Rule2+Rule3
My Group by Node output is
Now in Math node i have applied col_sum(columname) which gave me below output
I want output as
I am not sure where to write the fourth rule,Ideally it should be in Rule engine itself but it is not allowing me to wrote such rule.
Also I dont want my solution to be data driven.For eg
my current input dataset is
if i add one more row in it
and modify my rules to
$R$=40 => “Rule1”
$R$=50 => “Rule2”
$R$=110 => “Rule3”
Rule4=>Rule1+Rule2+Rule3(currently I am unable to write it)
$R$=120 => “Rule5”
Then How will i achieve it??
attached an example with Rule1-4
KNIME_project24.knwf (12.7 KB)
also should Rule1 not be R<=50 AND Rule3 <=100?
I have done it with this approach.Please have a look on the same.
KNIME_project.knwf (26.9 KB)
Thanks a lot for the guidance