<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using pre-defined Expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293722#M587230</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really following what you are trying to accomplish. Please provide sample data and QVW to make it easier to analyze your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 May 2011 13:01:05 GMT</pubDate>
    <dc:creator>ToniKautto</dc:creator>
    <dc:date>2011-05-12T13:01:05Z</dc:date>
    <item>
      <title>Using pre-defined Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293721#M587229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Expression Label is also an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What other way is there to identify an expression in a chart's list of expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help. I simply can't use the expression part of the expressions as it is just too long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Hesten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 12:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293721#M587229</guid>
      <dc:creator />
      <dc:date>2011-05-12T12:37:05Z</dc:date>
    </item>
    <item>
      <title>Using pre-defined Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293722#M587230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really following what you are trying to accomplish. Please provide sample data and QVW to make it easier to analyze your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 13:01:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293722#M587230</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2011-05-12T13:01:05Z</dc:date>
    </item>
    <item>
      <title>Using pre-defined Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293723#M587231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Toni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me break it down:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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)&amp;amp;' YTD Sales'".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;=[Sales]/[Qty]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;So I am looking for another way to identify an existing expression, something like column1 or expression1, or an ID of some sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does something like that exist?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 13:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293723#M587231</guid>
      <dc:creator />
      <dc:date>2011-05-12T13:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using pre-defined Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293724#M587232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if I understood you too, but maybe you need something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to settings, expression overview and create a new variable there: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vExpression1&lt;/P&gt;&lt;P&gt;for this variable you write the expression you want: &lt;/P&gt;&lt;P&gt;= sum(VALUE) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, you use the expressions you create on your chart by evaluation this&lt;/P&gt;&lt;P&gt;The expression on your chart will be:&lt;/P&gt;&lt;P&gt;=$(vExpression1) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way, after you create may variables, you can just create more complicated formulas: &lt;/P&gt;&lt;P&gt;=$(vExpression1) + $(vExpression2)- ($(vExpression3)&amp;nbsp; /$(vExpression4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: You may also create expressions for your labels&lt;/P&gt;&lt;P&gt;vLabel1 = max(Year)&amp;amp;' YTD Sales&lt;/P&gt;&lt;P&gt;Then on the expression label box write: =$(vLabel1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 13:18:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293724#M587232</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-12T13:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using pre-defined Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293725#M587233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hesten,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sajeevan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 13:19:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293725#M587233</guid>
      <dc:creator />
      <dc:date>2011-05-12T13:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using pre-defined Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293726#M587234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would recommend that you use Erich's suggestion since it is a bit more sofisticated, and adds more control to what you are doing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However there is a function called Column() that you can use in order to get column values. &lt;/P&gt;&lt;H4&gt;&lt;/H4&gt;&lt;H4&gt;Column (&lt;SPAN style="font-style: italic;"&gt;ColumnNo&lt;/SPAN&gt;)&lt;/H4&gt;&lt;P&gt;Returns the value found in the column &lt;SPAN class="Bold"&gt;ColumnNo&lt;/SPAN&gt; in a straight table or a pivot table.&lt;/P&gt;&lt;P&gt;There is &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 13:25:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293726#M587234</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2011-05-12T13:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using pre-defined Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293727#M587235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If these are my options, I will take a look at which one works better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 13:33:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-pre-defined-Expressions/m-p/293727#M587235</guid>
      <dc:creator />
      <dc:date>2011-05-12T13:33:41Z</dc:date>
    </item>
  </channel>
</rss>

