14 Replies Latest reply on Jul 29, 2016 6:34 PM by MPetro

    Rollup of analysis DR

    MPetro

      Hi,

       

      I want to rollup an attribute which is an output of an analysis expression without PI Point (analysis DR). The ideia is to save the aggregate result in a PI Point. I tested it in a simple setting (one equation expression, 2 elements) and it worked.

       

      In the real case, the expression has more equations (~20) and there are ~150 elements. The rollup doesn't work. No value is saved in the PI Point assigned to the output of the rollup. The backfill preview works fine and generate a table and graph with the right values. The 'evaluate' also works. But the backfill itself doesn't work. The custom rollup DR works fine.

       

      Am I doing something wrong or is it an AF limitation?

        • Re: Rollup of analysis DR
          gregor

          Hello Mauricio,

           

          of what version is PI Analysis Service?

          Can you provide some additional details of the Rollup? Something that allows us to test / reproduce what you experience?

            • Re: Rollup of analysis DR
              MPetro

              I use the AS 2015 R2.

              The Rollup is very simple.

               

              Attribute: filtered by category

              Attribute level: Root level

              Function: Sum; Output to TAG

              Scheduling: period 5m

               

              For the child elements, there are two templates. Both calculate the attribute with analysis expression and don't save the result. Below the simplest one. The other one do more calculations.

                • Re: Rollup of analysis DR
                  skwan

                  Hi Mauricio:

                  Please help me understand what you mean by "custom rollup DR".  Do you mean a custom data reference that you built yourself or do you mean something else?

                  A few comments:

                  1) Preview and Evaluate are both done on the client side, which means data access to the inputs are done using the security credential of the PI System Explorer user.  When the analyses are running online, data access is done by PI Analysis Service and it may have a different security credential.  Therefore, it's possible that Preview and Evaluate work but when the analyses are run online, PI Analysis Service may not because it cannot access the inputs.

                  2) You have child elements based on two templates, but your rollup is done at the "Root Level".  Is that really what you want?  I would think you want to rollup at the child element level.

                  3) Please consider upgrading to AF 2016 server and AF 2016 SP1 client as there are a few bug fixes related to analysis DR (not storing outputs).

                  Please keep us updated on your progress.

                  --

                  Steve Kwan

                    • Re: Rollup of analysis DR
                      MPetro

                      Hi Stephen,

                       

                      by rollup DR I mean that the rollup is done directly as DR without analysis (I don't know how do you call it). Usually we avoid using it, but since it does not require a PI Point to save the result, we end up using to show the current value.

                       

                      1) I will check that. I will try to save the result a single element in a PI Point. If it is ok, it shows that PI analysis is accessing all the inputs.

                      2) I was not clear enough. The root level is for the attribute (not element). In this case, I do rollup from child elements and select the attribute from the root level.

                      3) Yes. I already asked the IT guys to proceed the upgrade.

                        • Re: Rollup of analysis DR
                          Roger Palmen

                          By the looks of it, this is a custom datareference. In the past the was an example RollUp DataReference example to explain the programming of Custom DataReferences. This looks like that datareference. While these can work, there are quite some issues with the concept. I had these working fine in the past, but also got into a lot of troubles. So not recommending to use this.

                           

                          I would recommend to do RollUps using the RollUp function of Analytics, and not a custom DR.

                          1 of 1 people found this helpful
                            • Re: Rollup of analysis DR
                              MPetro

                              Yes, it is the custom DR. Just to make it clear, I am having problem with the rollup function of the Analytics. The custom DR was used in this case to check the result.

                               

                              Curiously our experience is that for simple rollup this custom DR shows less problem (more reliable, less down time) than the analytics. The disavantage is that it is unstable to make further calculation with the rollup result (crashes) and also that it is impossible to make time calculations (eg. average).  In fact, if the problem persists, my option will be to use the custom DR and to save the result in a PI Point through the analysis.

                          • Re: Rollup of analysis DR
                            MPetro

                            Problem solved.

                             

                             

                            Since I could not trust the Preview or Evaluate, I assigned temporary PI Points to each equation of the analysis. In this way I could really see what was going on in the analytics service, debugging each equation. I spotted one that was not retrieving any result.

                             

                             

                            Basically, there was a miss configuration in a table. A number parameter was configured as String. The Attribute configuration was correct (single), but It didn't show any inconsistency warning. In the analysis, the problem equation uses this parameter in a conditional equation (if then). It seems that in the Preview or Evaluate that doesn't cause any trouble.

                             

                            So the difference was not in security credential, but in some difference in how the online and off-line (Preview/Evaluate) treated an inconsistent configuration in the table regarding the value type.

                            2 of 2 people found this helpful
                              • Re: Rollup of analysis DR
                                skwan

                                Thanks for the update.  I will have a developer look into this issue.

                                --

                                Steve Kwan

                                • Re: Rollup of analysis DR
                                  dmoler

                                  Hi Mauricio,

                                   

                                  Can you give us more detail about how the table lookup was malfunctioning?  Did you need to add a Convert function to fix it?  Can you elaborate on which cases it was giving an error an which cases it seemed to behave correctly?

                                   

                                  Thanks!

                                  David

                                    • Re: Rollup of analysis DR
                                      MPetro

                                      Hi David,

                                       

                                      the table lookup was fine. The problem was a misconfiguration. The value type on the table was String. The table lookup Attribute was configured as Single. So there was an inconsistency between the Value Type (String) on the table and the Value Type of the Attribute (Single). It is used as a number. All the calculations were fine, but the analysis. Formula DR calcs were fine and so were the Preview/Evaluate. It was not obvious to spot the mistake. All I did was to change the Value Type on the table to Single and the analysis worked.

                                       

                                       

                                      The only nuisance was the different behavior between Preview/Evaluate/Formula and Analysis.

                                        • Re: Rollup of analysis DR
                                          dmoler

                                          Hi Mauricio,

                                           

                                          I agree - the result shouldn't be different between the two.  I see you have AS 2015 R2.  Can you also share the version of AF Server, and the AF Client on the machine running Analysis Service and the machine from which you did the preview?

                                           

                                          One more questions - how is the Table Lookup configured?  Does it use input attributes?  Is it configured with a Time Column?

                                           

                                          Thanks!

                                           

                                          David

                                            • Re: Rollup of analysis DR
                                              MPetro

                                              Hi David, it is all 2015R2.

                                               

                                               

                                              AF Server 2015 R2

                                              Analysis Service 2015 R2

                                              AF Client 2015 R2

                                               

                                               

                                              I updated to AF Client 2016 SP1 on my machine.

                                                • Re: Rollup of analysis DR
                                                  gregor

                                                  Hello Mauricio,

                                                   

                                                  Your question is still showing unanswered but reading the latest posts I am uncertain if you consider your issue resolved or not. Do you have additional questions or concerns? If so please let us know and please as well answer the questions from David Moler regarding your table lookup configuration.

                                                  If you consider your question answered, please pick the post that you feel has the answer by marking it as the [Correct Answer].

                                                • Re: Rollup of analysis DR
                                                  MPetro

                                                  Sorry, I missed the question from David Moler.

                                                   

                                                  The Table lookup is like below. No time column.

                                                   

                                                  Element1

                                                  Attribute1: %Attribute% (substitution parameter to get the name Element1), as single

                                                  Table1: first column is the name of the elemento, DesiredParameter as string (inconsistency here!)

                                                  Attribute2: Table lookup: SELECT [DesiredParameter] FROM [Table1] WHERE Column1 = @[Attribute1]