1 Reply Latest reply: Oct 27, 2016 3:37 PM by Kaushik Solanki RSS

    How to calculate Classification based on cumulated percentage on script?

    Riccardo Zenere

      Hi everyone,

       

      I'm trying to find a solution for my problem.

       

      I have an app that works on desktop environment that gives a classification of a product based on a cumulated percentage.

       

      This cumulated percentage is created on a table (that has fixed sort order, which is the descending order of a first measure we find in the table - that is also the measure on which we will calculate the percentage) in a hidden sheet; it is exported on qvd and then, when the app reloads, is loaded.

      The percentage and the first measure we find in the table can be influenced by selections on year/month/day/quarter/... and also by the selection of an anagraphic detail of the product (there are SO many possibilities!).

       

      Now I need to move this on a server environment and to make the application available on AccessPoint.

      The environment has QV11.2 SR12 and a publisher, so exporting the table on the hidden sheet and giving the end user the possibility to reload the application is not really what I was looking for.

      I've tried to calculate this classification dynamically on the frontend, but I'm not able to handle the sort order. The sort is based on the first measure on the table and not a dimension (so no, the sort option that we can find with the aggr function in QV12 is not the solution).

       

      So, not being able to calculate this on the frontend, I thought that maybe calculating this on a cross table in the model would have been the solution.

       

      Calculating the first measure (numerator of the percentage) was not a big problem, but I'm worrying about how to calculate the percentage: there are really many options that can influence the denominator, and I can't think of any way to handle them.

      Do you have any hint about how to move this on a script level and how to handle the percentage?

       

      Thanks to anyone that will help me