<?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: Using FirstSortedValue in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-FirstSortedValue-in-Set-Analysis/m-p/543830#M203174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Variables are not expanded row-by-row of your graph, that´s why it´s not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jan 2014 11:28:48 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2014-01-02T11:28:48Z</dc:date>
    <item>
      <title>Using FirstSortedValue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-FirstSortedValue-in-Set-Analysis/m-p/543829#M203173</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'm trying to use the result of a FirstSortedValue function within a set analysis expression to be able to Sum the values in a dimension for the latest week within a particular month or quarter, as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/50961_screen1.png" style="width: 620px; height: 212px;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see I'm getting the correct week number both when I explicitly define the function and when I use the variable vWeekFSV in the definition.&amp;nbsp; The problem I've got is when I try to use the either the explicit function or the variable as set analysis in a sum expression, as seen below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen2.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/50962_screen2.png" /&gt;&lt;/P&gt;&lt;P&gt;The total for December is correct however, I wanted numbers for the other months too.&amp;nbsp; It looks to me that the set analysis is not being modified by month, and is only calculating once for the last value in the chart.&amp;nbsp; The variable I've used is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue([ARR Combined Monthly Weekly Period], - aggr(max([ARR Combined Monthly Weekly Period]), [ARR Combined Monthly Weekly Period]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I've included it in the chart expression, as thus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum({&amp;lt;[ARR Combined Monthly Weekly Period] = {"$(=$(vWeekFSV))"}&amp;gt;}[RT Rent and SC Annual])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm happy to explore alternative ways of achieving the same result but on the face of it the set analysis route should be working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help gratefully appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 11:24:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-FirstSortedValue-in-Set-Analysis/m-p/543829#M203173</guid>
      <dc:creator>gstrathie</dc:creator>
      <dc:date>2014-01-02T11:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using FirstSortedValue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-FirstSortedValue-in-Set-Analysis/m-p/543830#M203174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Variables are not expanded row-by-row of your graph, that´s why it´s not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 11:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-FirstSortedValue-in-Set-Analysis/m-p/543830#M203174</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2014-01-02T11:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using FirstSortedValue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-FirstSortedValue-in-Set-Analysis/m-p/543831#M203175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anjos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your swift response, but when I put the variable on the chart it does expand it row by row, it's just not working in the Set Analysis.&amp;nbsp; Is this correct functionality?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 11:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-FirstSortedValue-in-Set-Analysis/m-p/543831#M203175</guid>
      <dc:creator>gstrathie</dc:creator>
      <dc:date>2014-01-02T11:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using FirstSortedValue in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-FirstSortedValue-in-Set-Analysis/m-p/543832#M203176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, check at the header of your last column. Can you see a "39" there? QlikView is calculating the value for the whole set and returning only to last row&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 11:38:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-FirstSortedValue-in-Set-Analysis/m-p/543832#M203176</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2014-01-02T11:38:51Z</dc:date>
    </item>
  </channel>
</rss>

