3 Replies Latest reply: Jul 16, 2015 10:59 AM by Stefan Wühl RSS

    How can I do this type of set analysis expression in the script?

    John Blomqvist

      Hello there,


      I have the following table:


      LOAD [Client number],
      [Tax Network],
      [Billing Partner],
      [Home BU],
      FinancialYear-1 as PrevFY,
      FinancialYear+1 as NextFY,
      Category as FYType,



      data.qvd file


      In the above table I am trying to create the front-end version of this expression below:





      Does anyone know how this can be achieved in the script with the table and example above please?


        • Re: How can I do this type of set analysis expression in the script?
          Prashant Baste

          Hi John


          Can you please tell against which dimensions you have wrote this expressions?


          If [Client Number] is your dimension then you can write it as below -


          Load [Client Number],



          From data.qvd

          Group by

          [Client Number],




          I have not tried it but it should work. Please confirm.


          Hope this will be helpful for you.




          Prashant P Baste

          • Re: How can I do this type of set analysis expression in the script?
            Stefan Wühl

            Before you start scripting, start thinking about the granularity you'll need.


            An expression in a chart is in general sensitiv to user selections (e.g. in Client Number).

            If you want to replicate the chart expression in the script, you would need to use an aggregation grouped by the chart's dimensions, filtered by any condition / set expression used in your chart expression, which can be VERY  demanding.

            You would need to repeat this for EVERY POSSIBLE user selection that your chart will respond to (except for few cases where your expression is insensitive to user selections. Your above sample is sensitive).


            I believe the complexity of your script calculation and execution time will overweigh the benefit of precalculating the values in the script.