Jump to content

Compute Sum of Month until yesterday


mattoe

Recommended Posts

Hello together,

I have the following question:

How can I compute the sum of a month until yesterday? The first signal is a production volume in [t] per day, which automatically writes the same value from yesterday 06:00 further into now until its value is changed again at 06:00 of the next day (black dotted line). The second signal is an energy volume in [t] per day, which updates its value automatically to the actual now value (red bar).

What I want is, to compute the sum of each signal (a sum for signal 1 and a sum for signal 2) per month, but without the current value, i.e., only until yesterday 06:00. If I just compute the sum per month, also the now value is taken into account but thats incorrect.

Any ideas? Thank you very much.

Regards

Matthias

1024000017_Seeqquestion.png.d203c6931fa68a3f6f92238cf4214d74.png 

Edited by mattoe
Link to comment
Share on other sites

Matthias,
I created a synthetic case in workbench trying to follow your requirements for one signal so that you can adapt it to your situation. Please find below the workflow and code in formula:

image.thumb.png.3db07ba113f83f548ba1cc876f67fb16.png

 

The associated results for the last three months are as follow:

image.thumb.png.3e235fda6d8cce08dc701a0e29cf2a0e.png

 

Note that the monthly sum of March is still uncertain (showed as a vertical bar with dashed lines) because the current month has not finished yet (03/17/2023). There are other ways to approach this situation, but the current methodology minimizes the uncertainty.

Hope this helps you.

Regards,

Alexander

 

 

 

Edited by Alexander
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...