# Rule engine

**URL:** <https://forum.knime.com/t/rule-engine/78529>\
**Category:** KNIME Analytics Platform\
**Created:** [April 15, 2024, 6:47pm UTC](https://forum.knime.com/t/rule-engine/78529 "2024-04-15T18:47:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RVTBEM](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/r/a6a055/32.png) [@RVTBEM](https://forum.knime.com/u/RVTBEM)\
**Post date:** [April 15, 2024, 6:47pm UTC](https://forum.knime.com/t/rule-engine/78529/1 "2024-04-15T18:47:02Z")

</div>

Hello everyone, I’m encountering issues with the rule engine that I can’t seem to resolve. Let me illustrate with an example: the first line sets a value equal to 161 (days calculated by summing the previous weeks 161/7= 23 previous operational states).  
Operative = 161.0

The second line establishes a value equal to 168 (days calculated by summing the previous weeks 168/7= 24 previous operational states). And so forth…  
Operative = 168.0  
I arrive at Failure, and the difference in days is 7 (days since the last state change).  
Failure = 7.0

Then the operative has 7 days compared to the previous one.  
Operative = 7.0

Operative = 14.0

Operative = 21.0

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/1/f/1f9ec5252bd546dd4a4f6820e82541c9d51ae2a6.png)  
[Examples.xlsx](https://forum.knime.com/uploads/short-url/8qZzUjCFHHaNe5lRDDHycSBdg6k.xlsx) (9.4 KB)

---

<div class="post-metadata">

**Author:** ![lelloba](https://forum-cdn.knime.com/user_avatar/forum.knime.com/lelloba/32/43992_2.png) [@lelloba](https://forum.knime.com/u/lelloba)\
**Post date:** [April 16, 2024, 7:51am UTC](https://forum.knime.com/t/rule-engine/78529/2 "2024-04-16T07:51:57Z")

</div>

Hi @RVTBEM ,

you can delete this post, since it is a duplicate of [Rule engine - KNIME Analytics Platform - KNIME Community Forum](https://forum.knime.com/t/rule-engine/78536/2) where I have replied you.

Have a nice day,  
Raffaello Barri

---

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [April 16, 2024, 8:19am UTC](https://forum.knime.com/t/rule-engine/78529/3 "2024-04-16T08:19:45Z")

</div>


