1 Reply Latest reply on Jul 6, 2012 3:13 PM by RJKSolutions

    Month/Year to date calculations w/ Datasets


      I am trying to calculate month- and year-to-date for some calculated values (datasets) in Processbook, but haven't been able to figure out how to do so.  I'm of the understanding that it is not possible to call datasets into other PI calculations (recursive calculations), so I assume I would need to use VBA to calculate these values.  Does anyone have any examples of code written to accomplish this or any other advice?


      Thank you.

        • Re: Month/Year to date calculations w/ Datasets

          Hi Brian.  If this is going to be an on going calculation then you should consider calculating them server side: Performance Equation, Totaliser, ACE, ... Then you reference the data like any other tag.


          Or...do you have AF? You could make use of the PI Point DR with the Formula DR, then access the data via the AF Dataset in Processbook.


          Or...use PI SDK to evaluate performance equations on the fly.


          You are right in that you cannot reference datasets from within a Dataset. From memory there is no clean way to obtain the value from a PI Expression Dataset in VBA.