<?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: Aggr Function on a Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-Function-on-a-Variable/m-p/973470#M970199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have exactly the same problem but I don't have understood your answer. &lt;/P&gt;&lt;P&gt;I have quantity by reference and the cost by reference (which is a calculated vvariable). So what I want to do is to get the total cost (costXquantity) by product line which goupped several references. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I do it with the number of my reference it works but if I want the sum of this product line, I don't get the total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I have been clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2015 09:22:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-23T09:22:37Z</dc:date>
    <item>
      <title>Aggr Function on a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-on-a-Variable/m-p/973467#M970196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hello QV Users;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have a variable that is used as a expressions in various places of a model, the variable is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;vPriceVar_OnVolume =&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;((&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vCRevInv)&lt;/EM&gt;&lt;/STRONG&gt; / &lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vCUnits)&lt;/EM&gt;&lt;/STRONG&gt;) - (&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vPRevInv)&lt;/EM&gt;&lt;/STRONG&gt; / &lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vPUnits)&lt;/EM&gt;&lt;/STRONG&gt;)/ &lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vPRate)&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp; * (&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vCUnits)&lt;/EM&gt;&lt;/STRONG&gt;-&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vPUnits)&lt;/EM&gt;&lt;/STRONG&gt;),&lt;SPAN style="color: #800000;"&gt;PartCode&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;InvoiceCurrencyCode2&lt;/SPAN&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I want to maintain the variable as is (do not want to create a new variable), but want to use it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;only in one expression of the table with an additional aggr dimension (FamilyCode)&amp;nbsp; like:&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN style="font-size: 10pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;((&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vCRevInv)&lt;/EM&gt;&lt;/STRONG&gt; / &lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vCUnits)&lt;/EM&gt;&lt;/STRONG&gt;) - (&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vPRevInv)&lt;/EM&gt;&lt;/STRONG&gt; / &lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vPUnits)&lt;/EM&gt;&lt;/STRONG&gt;)/ &lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vPRate)&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp; * (&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vCUnits)&lt;/EM&gt;&lt;/STRONG&gt;-&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vPUnits)&lt;/EM&gt;&lt;/STRONG&gt;),&lt;SPAN style="color: #800000;"&gt;PartCode&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;InvoiceCurrencyCode2,FamilyCode&lt;/SPAN&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;How can I add the additional aggr dimension to the variable, without creating a new variable or without&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;using the whole formula in the expression - can an additional aggr dimension added to an existing variable ? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;appreciate any help that can be extended.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kumar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 14:51:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-on-a-Variable/m-p/973467#M970196</guid>
      <dc:creator />
      <dc:date>2015-09-17T14:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function on a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-on-a-Variable/m-p/973468#M970197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't believe that's possible without modifying the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But maybe you can modify your variable to enable&lt;EM&gt; dollar sign expansion with parameters, &lt;/EM&gt;so you can use the same variable, and control the number of aggr() dimensions by the dollar sign expansion arguments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the HELP:&lt;/P&gt;&lt;H2&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Dollar&lt;/SPAN&gt;-&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Sign&lt;/SPAN&gt; &lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Expansion&lt;/SPAN&gt; with Parameters&lt;/H2&gt;&lt;P&gt;Parameters can be used in variable &lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;expansions&lt;/SPAN&gt;. The variable must then contain formal parameters, such as $1, $2, $3 etc. When expanding the variable, the parameters should be stated in a comma separated list. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;set MUL=’$1*$2’;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL(3,7)); //&lt;/SPAN&gt; returns '3*7' in X&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;let X=$(MUL(3,7)); //&lt;/SPAN&gt; returns 21 in X&lt;/P&gt;&lt;P&gt;If the number of formal parameters exceeds the number of actual parameters only the formal parameters corresponding to actual parameters will be expanded. If the number of actual parameters exceeds the number of formal parameters the superfluous actual parameters will be ignored. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;set MUL=’$1*$2’;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL); //&lt;/SPAN&gt; returns '$1*$2' in X&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL(10)); //&lt;/SPAN&gt; returns '10*$2' in X&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;let X=$(MUL(5,7,8)); //&lt;/SPAN&gt; returns 35 in X &lt;/P&gt;&lt;P&gt;The parameter $0 returns the number of parameters actually passed by a call. &lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P class="Code"&gt;set MUL='$1*$2 $0 par'; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;set X=$(MUL(3,7)); //&lt;/SPAN&gt; returns '3*7 2 par' in X &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 15:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-on-a-Variable/m-p/973468#M970197</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-09-17T15:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function on a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-on-a-Variable/m-p/973469#M970198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Swuehl, your feedback would solve my issue, appreciate the help &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 17:28:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-on-a-Variable/m-p/973469#M970198</guid>
      <dc:creator />
      <dc:date>2015-09-17T17:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function on a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-on-a-Variable/m-p/973470#M970199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have exactly the same problem but I don't have understood your answer. &lt;/P&gt;&lt;P&gt;I have quantity by reference and the cost by reference (which is a calculated vvariable). So what I want to do is to get the total cost (costXquantity) by product line which goupped several references. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I do it with the number of my reference it works but if I want the sum of this product line, I don't get the total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I have been clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 09:22:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-on-a-Variable/m-p/973470#M970199</guid>
      <dc:creator />
      <dc:date>2015-09-23T09:22:37Z</dc:date>
    </item>
  </channel>
</rss>

