Hello all,
I have a transaction group running on a trigger from PLC. This transaction group records the values and stores them into the DB. The next step i am trying to calculate the difference between two rows of AWN Totalizer and RODI totalizer and store them in a new column as AWN FLOW and RODI FLOW. I have heard about the LAG function but not sure how to go about storing and triggering that query.
On your DB query to get that table you can add the columns for viewing purposes easily, but they wouldn’t be written to the DB itself. If that’s all you need ?
I am trying to calculate the difference between the AWN Totalizer from one day and previous day and store it in a new column in the same table as AWN Flow.
eg, AWN Totalizer on Day2 - AWN totalizer on day 1 store it in as AWN Flow in same row.