15 Replies Latest reply on Nov 12, 2015 7:51 AM by akasfikis

    Doing MTD (month to date) and YTD(year to date) using AF

    fsaab

      Hello,

       

      I was reading on the forum that the best way to do MTD and YTD is to use AF new calculation features.Kindly can you provide me with guidance or sample solution on how to do that.

       

      MTD/YTD can be done using totalisers. but how to recalculate totalisers?

        • Re: Doing MTD (month to date) and YTD(year to date) using AF
          skwan

          Francois:

           

          Please install AF 2014 R2 and the accompanying PI Analysis Service 2014 R2.  Once you have both installed, there will be a new tab in PI System Explorer called "Analyses".  Go there and you can configure MTD or YTD calcs using PE.

          • Re: Doing MTD (month to date) and YTD(year to date) using AF

            Hello Francois,

             

            I've moved this thread to PI System Integration forum because it fits better here.

             

            Francois Saab

            MTD/YTD can be done using totalisers. but how to recalculate totalisers?

             

            There's no recalculation nor backfilling mechanism provided by PI Totalizer subsystem.

             

            Francois Saab

            Can this be donewith previous versions of AF?  do i have previous versons of analysis services in AF 2012 sp1 for example??

             

            No. Asset Based Analytics was introduced with PI AF 2014. We highly recommend using the current release PI AF 2014 R2. Windows Server Windows Server 2008 R2 SP1 is a supported platform (please see the PI AF 2014 R2 Release Notes). My understanding of Windows Server 2008 R2 Upgrade Paths (Microsoft TechNet resource) is that you should be able to upgrade to Windows Server 2008 R2 SP1.

              • Re: Doing MTD (month to date) and YTD(year to date) using AF
                mhalhead

                Hi Francois,

                 

                I would not recommend creating a MTD or YTD totalizer using the totalizer subsystem. While the totalizer ss works well there are some quirks related to the fact that it runs against the snapshot database. For example you have to wait a full period to start getting the correct totalisers. If the totals goes bad for some reason; say you have a plant maintenance and there is no valid data then you have to wait for the period to expire to recover; the % good data can bit you. If you change a totalisers configuration then you will hit the same problem. With a YTD this could mean waiting quite some time.

                 

                I would recommend using short periods for example daily totals and then aggregating those. The daily total already reduces the amount of data considerable; e.g. 84000 (1 second logging) -> 1; therefore only 365 per year. It is also more robust; a problem only impacts a single day which you can fix manually or using something like ACE (we have used both; the manual input is via web interface).

                 

                A higher frequency total also provides more flexibility; e.g. quarter total, half year, ... The amount of data is now small enough that you can do the MTD or YTD roll up in the reporting/analysis layer. PowerPivot (or even straight Pivot) or SSAS cubes (pick your flavor) work well for this sort of roll up.

                 

                AF Analytics (aka Abacus) has at best rudimentary totalizing functionality. There is the tagtot PE function and functions for things like Beginning of Month. However, there is no flexibility or control over the output time. There is no functionality to handle late bound data like lab data (BTW the totalizer ss doesn't handle this either). I recently worked with tech support to create an analysis to roll up daily totals; which I'm happy to share (shout). This solution I'm afraid was brittle so we abandon it.

                 

                @Steve: I would be interest to see how you would approach this problem in AF Analytics. BTW AF Analytics is a good v1 product but it needs lots more.

              • Re: Doing MTD (month to date) and YTD(year to date) using AF
                akasfikis

                YTD; TagAvg('Current Status','1-1','*')*100

                 

                MTD; TagAvg('Current Status',BOM('*'),'*')*100

                 

                Simple..