6 Replies Latest reply: May 12, 2011 9:33 AM by hesten RSS

    Using pre-defined Expressions



      I need to use pre-defined Expressions of a chart in other expressions, to form new columns, but the problem is that the pre-defined expressions don't have straight forward names/labels like 'Sales' or 'Total'.


      The Expression Label is also an expression.


      What other way is there to identify an expression in a chart's list of expressions.


      I might be imagining things, but I'm sure there is still a way to use these expressions in other expressions, something like [Expression 1] + [Expression 3].


      Please help. I simply can't use the expression part of the expressions as it is just too long.


      Thanks in advance.


      Kind Regards,


        • Using pre-defined Expressions
          Toni Kautto

          Not really following what you are trying to accomplish. Please provide sample data and QVW to make it easier to analyze your problem.

            • Using pre-defined Expressions

              Hi Toni,


              Let me break it down:


              I have a Straight table chart. The Chart contains 5 complex expressions. I now want to use the expressions to create a new expression. The problem is that the existing expressions' labels are also expressions for example: "=max(Year)&' YTD Sales'".


              Instead of me having to copy and re-use the 'expression scripts' from the existing expressions, I want to use a label, id or some sort of name for the existing expressions so that I can create a new expression.


              For example: If I have 2 existing expressions named 'Sales' and 'Qty', I can now go and create a third expression 'Sales Price' and use the existing expressions' names for the calculation in the third Expression:



              Because, in the chart that I am busy with currently, the expression labels are also expressions, I can't seem to use the same logic.

              So I am looking for another way to identify an existing expression, something like column1 or expression1, or an ID of some sort.


              Does something like that exist?


              Please advise.


              Kind Regards-

              • Re: Using pre-defined Expressions
                Erich Shiino

                I'm not sure if I understood you too, but maybe you need something like this.


                Go to settings, expression overview and create a new variable there:



                for this variable you write the expression you want:

                = sum(VALUE)


                Then, you use the expressions you create on your chart by evaluation this

                The expression on your chart will be:



                This way, after you create may variables, you can just create more complicated formulas:

                =$(vExpression1) + $(vExpression2)- ($(vExpression3)  /$(vExpression4)


                Hope it helps,




                EDIT: You may also create expressions for your labels

                vLabel1 = max(Year)&' YTD Sales

                Then on the expression label box write: =$(vLabel1)

              • Re: Using pre-defined Expressions
                Sajeevan Govindan

                Hi Hesten,


                You can use variables to store the expressions and then use them in the chart expressions if you want to use those pre-defined expressions in multiple charts.


                You can also load such expressions from an excel file. Find attached an example excel files with many expressions I am using at different charts.


                Best Regards,