<?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 Re: could I call a Sub since Expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685402#M248400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but a mean the sentence of your example '$(Variablename($=Concat(Distinct&amp;nbsp; Product,chr(44)))'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can set in the setings or directly in a Expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Sep 2014 18:48:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-24T18:48:11Z</dc:date>
    <item>
      <title>could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685394#M248392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I han a sub in the Script área, this sub can I call in a Expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 15:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685394#M248392</guid>
      <dc:creator />
      <dc:date>2014-09-24T15:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685395#M248393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no, you can't execute backend function from frontend (macro excepted)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 17:33:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685395#M248393</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-24T17:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685396#M248394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well in that case,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could&amp;nbsp; I set a variable for axample selecting a value from list box?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 17:50:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685396#M248394</guid>
      <dc:creator />
      <dc:date>2014-09-24T17:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685397#M248395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can create variables with parameters, so you can have something like "user defined functions" within charts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An easy example would be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say your formula is Sum({$&amp;lt;Product={&lt;STRONG&gt;'$1'&lt;/STRONG&gt;}&amp;gt;} Sales). In this case the '$1' part, will be calculated until there is some interaction with an external event (like a user selecting one or more products from a listbox). It is important to note that your "dynamic" variable cannot be precalculated, otherwise it won't work correctly. This means that when you create your variable you should not include a &lt;STRONG&gt;= &lt;/STRONG&gt;at the beginning of your expression.&lt;/P&gt;&lt;P&gt;Then when calling this variable you need to use the following syntax: &lt;STRONG&gt;$(VariableName(Parameter1, parameter2, parameterN))&lt;/STRONG&gt;. Just like in a sub you can define 1 or any number of parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This QlikView Feature allows you to reuse a single variable for many different scenarios and to make your variables more dynamic,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 18:03:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685397#M248395</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-09-24T18:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685398#M248396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for your example if you want the user to calculate something depending on a selection, regarding my previous post, the variable call would be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(VariableName( $(=Concat(distinct Product, chr(44) ))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this concat function in order to allow users to calculate for example the sum of sales of 1 or any product that is selected in a listbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also store the &lt;STRONG&gt;$(=Concat(distinct Product, chr(44)) &lt;/STRONG&gt;in another variable so it can be easier for end-users to reuse expressions across different variables,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 18:09:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685398#M248396</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-09-24T18:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685399#M248397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Jaime.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 18:11:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685399#M248397</guid>
      <dc:creator />
      <dc:date>2014-09-24T18:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685400#M248398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jaime,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need set that you sed since the setings -&amp;gt;Variables Panel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 18:31:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685400#M248398</guid>
      <dc:creator />
      <dc:date>2014-09-24T18:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685401#M248399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the easiest way of creating variables is going to settings &amp;gt; variable overview (Panel de variables)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 18:35:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685401#M248399</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-09-24T18:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685402#M248400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but a mean the sentence of your example '$(Variablename($=Concat(Distinct&amp;nbsp; Product,chr(44)))'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can set in the setings or directly in a Expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 18:48:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685402#M248400</guid>
      <dc:creator />
      <dc:date>2014-09-24T18:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685403#M248401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For this example the expression has to be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({$&amp;lt;Product={'$1'}&amp;gt;}Sales) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So let's say this expression is inside a variable called &lt;STRONG&gt;v1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then when you call it in a chart you have to use this syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(v1( &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;$(=Concat(Distinct&amp;nbsp; Product,chr(44))) &lt;/STRONG&gt;)) The text in bold is the parameter of your variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;$(=Concat(Distinct&amp;nbsp; Product,chr(44))) can be anything. When the variable is calculated the '$1' in your original expression will be substituted with whatever you put inside the parameter of the variable. &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 18:54:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685403#M248401</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-09-24T18:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685404#M248402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok ok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and for example if I got this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr (sum([3d l]/1000000),[month_name])&lt;/P&gt;&lt;P&gt;I wont replace [3d 1]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only =aggr(sum['$1']/1000,[month_name])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is that correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 21:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685404#M248402</guid>
      <dc:creator />
      <dc:date>2014-09-24T21:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: could I call a Sub since Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685405#M248403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I think it should work, just be careful with field names with spaces (use [ ] or " " to enclose them)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 14:31:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/could-I-call-a-Sub-since-Expressions/m-p/685405#M248403</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-09-25T14:31:01Z</dc:date>
    </item>
  </channel>
</rss>

