4 Replies Latest reply on Apr 13, 2018 6:53 PM by jfrench

    Accumulated Chart


      Hi Team,


      I am trying to accomplish a very simple thing but PI is giving me variable results. I have tried various tips written in the Forum but couldn't accomplish it.


      I am trying to achieve an Accumulated Chart like this-



      Could anyone please give me some pointers?




        • Re: Accumulated Chart
          André Åsheim


          This can be calculated in several ways.

          Totalizer Today->Now: TagTot('raw',T,*)

          Keep it as event-triggered and it should accumulate like you explain.


          A second way (less robust) would be.

          Accumulated = Raw+Accumulated

          Then do a reset every day. For example if(Hour=00 and minute = 00) then 0 else Raw+Accumulated

          1 of 2 people found this helpful
          • Re: Accumulated Chart

            Hey Kennedy,


            Can you provide some more information?

            -What problem are you running into? What do you mean by variable results?

            -How are you pulling in your data?

            -How are you calculating the accumulated data?


            Thank you,


              • Re: Accumulated Chart

                Hi Jonathan,


                We have tried a lot of things t this point.


                Read somewhere in the forum that we do a Tagmean and multiply by the EventCount-


                Results are again not as expected-

                Using TagTot for calculation-

                The results are again not as expected-

                  • Re: Accumulated Chart

                    Hey Kennedy,

                    Looks like you are trying to use future data for your analysis, is that your intent?


                    Tagtot() and TagMean()*EventCount() are calculating two different things. So I think we need to determine which one you really need first.


                    Tagtot() does a time integral of an attribute's value over a specified time range.

                    TagMean()*EventCount() will give you the total sum of a tag during a specified time range.


                    Correct me if I'm wrong, but I believe you want TagMean()*EventCount() in your situation. First glance your calculations look correct. I think it would be helpful to break your calculation apart for testing, doing something like this:

                    That way you can see what each function is doing. Take these values and compare it to what it is when you manual calculate it.


                    It my example I made it very easy I had 2 values, 99.028+86.378=185.406 which is rounded to 185.41.