<?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: Need help with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200796#M386719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I seem to be missing something here,Can you share how the output must look like; as per the data you have shared if max&amp;nbsp; date must be considered, i fail to understand why use average we just need to display the score of max date for each user right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2016 13:59:38 GMT</pubDate>
    <dc:creator>anushree1</dc:creator>
    <dc:date>2016-10-04T13:59:38Z</dc:date>
    <item>
      <title>Need help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200795#M386718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a set of data with user &lt;STRONG&gt;ID&lt;/STRONG&gt;, &lt;STRONG&gt;Category&lt;/STRONG&gt;, &lt;STRONG&gt;CreationDate&lt;/STRONG&gt;, and &lt;STRONG&gt;Score&lt;/STRONG&gt; fields. A user may have multiple &lt;STRONG&gt;CreationDates&lt;/STRONG&gt;. When I average the Scores, I need to average scores for each user for the &lt;STRONG&gt;max CreationDate for that user&lt;/STRONG&gt;. I'm stuck on the set analysis to manage this. I have attached an image. Also I have attached a sample qvw and Excel data workbook. Any assistance is appreciated.&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/139568_Sample.png" style="height: 328px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 13:51:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200795#M386718</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2016-10-04T13:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200796#M386719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I seem to be missing something here,Can you share how the output must look like; as per the data you have shared if max&amp;nbsp; date must be considered, i fail to understand why use average we just need to display the score of max date for each user right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 13:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200796#M386719</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2016-10-04T13:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200797#M386720</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&gt;&lt;STRONG&gt;Avg(Aggr(FirstSortedValue(Score, -CreationDate), ID, Category))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139571_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 13:59:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200797#M386720</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-04T13:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200798#M386721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&amp;nbsp; That worked great with the simplified data in my sample, but when I tried to apply it to the more complex actual data it failed. In the actual data there are multiple records with the same ID, Category and Creation data. Evidently the FirstSortedValue function returns null if there are multiple records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some way to use set analysis something like CreationDate = date(max(CreationDate)) instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 15:13:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200798#M386721</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2016-10-06T15:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200799#M386722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you need to use DISTINCT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Avg(Aggr(FirstSortedValue(&lt;/STRONG&gt;&lt;STRONG style="color: #ff0000;"&gt;DISTINCT&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Score, -CreationDate), ID, Category))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if possible provide a sample which shows the issue you are facing and we might be able to help you out with another expression &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 15:17:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-set-analysis/m-p/1200799#M386722</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-06T15:17:47Z</dc:date>
    </item>
  </channel>
</rss>

