2 Replies Latest reply: Aug 9, 2011 3:01 PM by Patricio Solari RSS

    Problem with Set Analysis

    Patricio Solari

      I have Period='AUG' that corresponds to FiscalPeriodNumber=11

      If I try to use Period in Set Analysis, it works but if I use FiscalPeriodNumber it doesn't work.

       

      In the following 1) is ok and 2) doesn't work

       

      1) sum({$<FiscalYear = {2011}, Period={'AUG'} >} ShippedUnits/12)

      2) sum({$<FiscalYear = {2011}, FiscalPeriodNumber={11} >} ShippedUnits/12)

       

      The first one give me the right value but the second one returns zero.

       

      Could someone give me any tip to find what could be wrong in the formula.

       

      Thank you.

       

       

      FiscalYearPeriodFiscalPeriodNumberSum(ShippedUnits/12)If(FiscalPeriodNumber =11 , 'ELEVEN')sum({$<FiscalYear = {2011}, Period={'AUG'} >} ShippedUnits/12)sum({$<FiscalYear = {2011}, FiscalPeriodNumber={11} >} ShippedUnits/12)
      2011OCT140,029-00
      2011NOV238,226-00
      2011DEC315,028-00
      2011JAN443,439-00
      2011FEB537,104-00
      2011MAR667,346-00
      2011APR741,900-00
      2011MAY835,676-00
      2011JUN955,157-00
      2011JUL1027,697-00
      2011AUG117,802ELEVEN7,8020


      Note: In my application I am actually using a variable instead of 11. I simplified the formula before submitting to the forum.

        • Problem with Set Analysis

          Hello Patricio,

           

          I rebuild your example with an application of my own. Had no problems with QV, it works as expected. I suspect the syntax (or value) of your variable. So please send your expression and your variable or even better a little app with the whole chart.

           

          Regards, Roland

            • Problem with Set Analysis
              Patricio Solari

              Thank you Roland. You are right.

              I did the same as you in a dummy document and it worked. So I decided to create a new document from scratch, copy the script and copy all the objects. It worked like this. Both documents are exactly the same (script and objects)

              It was a document that was created originally in 8.2 even if now we have 9 SR6. It is not the first time that I have unexpected problems with old documents that I cannot solve unless I re-create everything from scratch.

              Here are the results in the new document

              FiscalYearPeriodFiscalPeriodNumberSum(ShippedUnits/12)If(FiscalPeriodNumber =11 , 'ELEVEN')sum({$<FiscalYear = {2011}, Period={'AUG'} >} ShippedUnits/12)sum({$<FiscalYear = {2011}, FiscalPeriodNumber= {11} >} ShippedUnits/12)
              409,403-7,8027,802
              2011OCT140,029-00
              2011NOV238,226-00
              2011DEC315,028-00
              2011JAN443,439-00
              2011FEB537,104-00
              2011MAR667,346-00
              2011APR741,900-00
              2011MAY835,676-00
              2011JUN955,157-00
              2011JUL1027,697-00
              2011AUG117,802ELEVEN7,8027,802