# Limiting a formula to a condition

## Recommended Posts

Hello,

I will start by explaining what i’m trying to do. Referring to the pictures:

1- Flow: actual real-time flow.
2- Design flow: a formula i created and typed a number, for example “188”.
3- Percent: (Actual flow/Design flow)*100.

I also created some conditions to define when the equipment is running, and a periodic daily condition.

Basically, I want to display the “Percent” value when the equipment is running only. I have created a table to find its daily average during the daily condition, but the problem is that the values gets mixed with when the equipment is not running.

For example, in one of the pictures, I’m getting a percentage of 39%, while it should be around 60%. The reason for the low percentage is that the algorithm included the time the equipment was not running.

Any recommendations?

thanks

##### Share on other sites

Hi Jacob.

you can use the within() function to include only the portions of the signal while the condition appears and then use this signal in your calculations:

Regards,

Thorsten

• 2
• 1