<?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 Aggregate using a Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-using-a-Variable/m-p/662972#M241532</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 have defined a variable $(vPlace) that can either be 0 or 1.&amp;nbsp; I want to try and find the max value of "rating" if $(vPlace) equals 1 but with my current attempt the result returned is null &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression is: &lt;STRONG&gt;=aggr(max(rating),($(vPlace)='1'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm struggling to find the correct syntax to make this work - any help appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Sep 2014 13:25:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-22T13:25:39Z</dc:date>
    <item>
      <title>Aggregate using a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-using-a-Variable/m-p/662972#M241532</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 have defined a variable $(vPlace) that can either be 0 or 1.&amp;nbsp; I want to try and find the max value of "rating" if $(vPlace) equals 1 but with my current attempt the result returned is null &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression is: &lt;STRONG&gt;=aggr(max(rating),($(vPlace)='1'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm struggling to find the correct syntax to make this work - any help appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 13:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-using-a-Variable/m-p/662972#M241532</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-22T13:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate using a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-using-a-Variable/m-p/662973#M241533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if( $(vPlace) = 1 , max(rating)&amp;nbsp; )&amp;nbsp; -&amp;gt; will calculate the max rating if your variable is 1.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is place a field in your data model and you want to calculate the maximum rating when place = 1&amp;nbsp; ?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max (&amp;nbsp; {$&amp;lt;Place = {'$(vPlace)'}&amp;gt;}&amp;nbsp; Rating ) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 13:27:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-using-a-Variable/m-p/662973#M241533</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-22T13:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate using a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-using-a-Variable/m-p/662974#M241534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Max(If(&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(vPlace)='1',&lt;/STRONG&gt;rating))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 13:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-using-a-Variable/m-p/662974#M241534</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-09-22T13:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate using a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-using-a-Variable/m-p/662975#M241535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anbu.&amp;nbsp; Seems I didn't need to use aggr after all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 13:47:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-using-a-Variable/m-p/662975#M241535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-22T13:47:16Z</dc:date>
    </item>
  </channel>
</rss>

