7 Replies Latest reply: May 22, 2011 5:00 AM by Deepak Vadithala RSS

    Add Calculated Dimension via Macro

      There is an old discussion related to this in the archive. Unfortunately, the attachment is not available and the proposed solution in the text does not seem to work. Does anyone know how to accomplish the following.

      I am trying to add the following calculated dimension to a chart via a macro:


      The macro doesn't stop on the .adddimension statement:

      chart.addDimension "if(payment_terms='PP',1,null())"

      but it does not add a dimension to the chart at all. I have tried putting 'PP' into a variable, putting CHR() functions in place of the single quotes, etc.

      Thank you in advance...I have been tearing my hair out!

        • Add Calculated Dimension via Macro
          Michael Solomovich

          In fact, I am using AddDimension for the calculated dimensions in a production application, and it does work. You problem is apparently somewhere else. First of all, add the "=" beforethe "if". The definition of the calculated dimension in the macro must be exactly the same as if you created it manually.