<?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 Aggr and set analysis expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183837#M383263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following table is a sample of my data. I have the countries, the FIELD_VALUE, the ID, MyField (only to filter) and my VALUE_TO_CALC.&lt;/P&gt;&lt;P&gt;What I want to calculate is the only of VALUE_TO_CALC, filtering by MyField=something, and where the ID = max(ID) per country. Then, for AT it should return 3, for BE it should return 4, etc. &lt;/P&gt;&lt;P&gt;This is my expression, but it is returning the max of ID, instead of the max of VALUE_TO_CALC:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;only({&amp;lt;MyField={'something'}&amp;gt;}&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;aggr( Max(ID),COUNTRY))&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SAMPLE.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/138821_SAMPLE.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate any help. &lt;/P&gt;&lt;P&gt;Thanks in advance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, &lt;/P&gt;&lt;P&gt;Inês &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Sep 2016 13:48:27 GMT</pubDate>
    <dc:creator>inescastelhano</dc:creator>
    <dc:date>2016-09-27T13:48:27Z</dc:date>
    <item>
      <title>Aggr and set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183837#M383263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following table is a sample of my data. I have the countries, the FIELD_VALUE, the ID, MyField (only to filter) and my VALUE_TO_CALC.&lt;/P&gt;&lt;P&gt;What I want to calculate is the only of VALUE_TO_CALC, filtering by MyField=something, and where the ID = max(ID) per country. Then, for AT it should return 3, for BE it should return 4, etc. &lt;/P&gt;&lt;P&gt;This is my expression, but it is returning the max of ID, instead of the max of VALUE_TO_CALC:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;only({&amp;lt;MyField={'something'}&amp;gt;}&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;aggr( Max(ID),COUNTRY))&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SAMPLE.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/138821_SAMPLE.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate any help. &lt;/P&gt;&lt;P&gt;Thanks in advance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, &lt;/P&gt;&lt;P&gt;Inês &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 13:48:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183837#M383263</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2016-09-27T13:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr and set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183838#M383264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Only({&amp;lt;MyField={'something'}&amp;gt;} &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Aggr(&lt;SPAN style="color: #ff0000;"&gt;FirstSortedValue(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;{&amp;lt;MyField={'something'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;VALUE_TO_CALC, -&lt;/SPAN&gt;ID),&lt;/SPAN&gt; COUNTRY))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 13:51:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183838#M383264</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-27T13:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr and set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183839#M383265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what your dimensions are, but you may not need Aggr() function here:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue({&amp;lt;MyField={'something'}&amp;gt;} VALUE_TO_CALC, -ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 13:54:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183839#M383265</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-27T13:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr and set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183840#M383266</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;Thanks, it works but there is one problem: this is retrieving the value in the first entry, and not in the max. For example I think that for AT it should return 55 but in the row of 55, and not in the row of 57. Do you have any idea to solve this?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sam.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/138823_sam.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:31:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183840#M383266</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2016-09-27T14:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr and set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183841#M383267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want to have &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;VALUE_TO_CALC&lt;/STRONG&gt; as one of your dimensions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:35:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183841#M383267</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-27T14:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr and set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183842#M383268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183842#M383268</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2016-09-27T14:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr and set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183843#M383269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/138826_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;COUNTRY&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expressions&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue({&amp;lt;MyField={'something'}&amp;gt;} FIELD_VALUE, -ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Max({&amp;lt;MyField={'something'}&amp;gt;} ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue({&amp;lt;MyField={'something'}&amp;gt;} MyField, -ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue({&amp;lt;MyField={'something'}&amp;gt;} VALUE_TO_CALC, -ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183843#M383269</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-27T14:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr and set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183844#M383270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:49:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-set-analysis-expression/m-p/1183844#M383270</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2016-09-27T14:49:59Z</dc:date>
    </item>
  </channel>
</rss>

