Jump to content

Compute Sum of Month until yesterday


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.




Edited by mattoe
Link to comment
Share on other sites

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:



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



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.






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...