Hi could you help me with how I could calculate the power consumption by hours from Y to T of a crusher drive with two conditions one of the feeder and the other of the power, if the feeder current status is 0 the power should be 0.

is something like (if feeder.Current = 0 THEN "power_crusher" else 0, "<>0") and the result all the time that this condition do not are true sum all the power /per hour.

I try with this :

if ('Feeder_2'=0) then ('Crusher_2_Power'=0) else TagAvg('Crusher_2_Power','y','t')/24

Result : If ('Feeder_2'=0) Then 0 Else TagTot('Crusher_2_Power','y','t')/24