Using DDIF or DDFN to make tank level Calculation will work fine if your tank is increasing. That is what these calculation were designed for was for the higher number to be subtracted from the lower number. Today’s value minus yesterday’s value for example a tank that is always filling you would have today’s flow minus yesterday’s flow in order to know how much filled the tank.
Using LV or LVAL to make a tank level calculation will work when subtracting the LVAL from today’s value.
Example : LVAL(V21) – V21 Using the ABS function along with it will allow you to not receive a neg value.
Using an if statement to reflect that when the number is below a certain level a set amount will be put back into the tank.
Example: If(LV(V25,30,-1)-V25 <1, +500, ABS(LV(V25,30,-1) - V25))
This equation suggest that if the calculation V25 looks back 30 days starting its search yesterday and it subtracts from today’s value and that value is less than 1 then add 500 before the calculation is done again.
Example of ABS function used with the LV equation:
Example of LV equation:
Example of if statement using the last value: