<?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: Set Analysis with FirstSortedValue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221113#M518540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr(If(FirstSortedValue(TOTAL &amp;lt;Principal, QSSCAT&amp;gt; DISTINCT VISIT, -Date) = VISIT, Avg(Value)), Principal, QSSCAT, VISIT))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Dec 2016 18:49:47 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-12-07T18:49:47Z</dc:date>
    <item>
      <title>Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221101#M518528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this application I wanna show for each Principal and Subcategory, which is my last Visit and the avg of the values of this visit.&lt;/P&gt;&lt;P&gt;The problem is that my expression is not working properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Box 1: Last Visit is the calculation that is not working.&lt;/P&gt;&lt;P&gt;VISIT calculation is showing correctly, but Last Visit is calculating the average for all Visits, and should calculate only the AVG for the Visit that appears on the table. On this example should be 0.&lt;/P&gt;&lt;P&gt;Last Visit 2 is supppose to be the same calculation with the first $ in the right place, but is doesn´t work showing this null value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Box 2 is only a simple AVG calculation. I expect to see 3 lines, one for each VISIT (SCREENING, DAY 1/RCP, DAY 85/RCP), but is only showing for SCREENING cause the others are 0. I tried to show all values but shows me a lot of null lines and I don´t know why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Box 3 is the complete data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone can explain me how to fix this Last Visit Calculation?&lt;/P&gt;&lt;P&gt;Mine is &lt;EM&gt;avg(${&amp;lt;VISIT={$(=FirstSortedValue(DISTINCT VISIT,-Date))}&amp;gt;} Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="firstsortedvalue.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/145877_firstsortedvalue.jpg" style="height: 295px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 11:41:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221101#M518528</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2016-12-07T11:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221102#M518529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your Date field is a Text, can't use FirstSortedValue with that, can you post the excel workbook as well&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 11:48:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221102#M518529</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2016-12-07T11:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221103#M518530</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;Avg({&amp;lt;VISIT = {"$(=FirstSortedValue(DISTINCT VISIT,-Date))"}&amp;gt;}Value)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 11:51:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221103#M518530</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-12-07T11:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221104#M518531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Box 2&lt;/P&gt;&lt;P&gt;Go to presentation tab and untick suppress zero values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 11:55:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221104#M518531</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-12-07T11:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221105#M518532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed to date and nothing works now. It should work with date or only number?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 14:01:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221105#M518532</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2016-12-07T14:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221106#M518533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remove the DISTINCT Keyword , i haven't tested this though&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 14:06:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221106#M518533</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2016-12-07T14:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221107#M518534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like attached?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 14:13:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221107#M518534</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-07T14:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221108#M518535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1st Box's expression needs single quotes&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg({$&amp;lt;VISIT={&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;$(=FirstSortedValue(DISTINCT VISIT,-Date))&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;}&amp;gt;} Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd Box's expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Value)+Avg(0.00000000000000000000000001)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and change the number tab to show up until 8 decimals&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/145906_Capture.PNG" style="height: 329px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 14:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221108#M518535</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-07T14:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221109#M518536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This Also Works&lt;/P&gt;&lt;P&gt;VISIT =MaxString({&amp;lt;Date = {'$(=MIN(Date))'}&amp;gt;} VISIT)&lt;/P&gt;&lt;P&gt;Max({&amp;lt;Date = {'$(=MIN(Date))'}&amp;gt;} Value)&lt;/P&gt;&lt;P&gt;MaxString({&amp;lt;Date = {'$(=MIN(Date))'}&amp;gt;} Date)&lt;/P&gt;&lt;P&gt;AVG({&amp;lt;Date = {'$(=MIN(Date))'}&amp;gt;} Value)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 14:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221109#M518536</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2016-12-07T14:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221110#M518537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry but it is not working correct for all cases. See again the image. &lt;/P&gt;&lt;P&gt;Box 1, first line. 250 is the average for All visits in Ambulation, and should be the average for only Visit DAY 85/RCP, that is 407.5&lt;/P&gt;&lt;P&gt;Application attached again&lt;/P&gt;&lt;P&gt;&lt;IMG alt="firstsortedvalue.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/145934_firstsortedvalue.jpg" style="height: 330px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 18:19:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221110#M518537</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2016-12-07T18:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221111#M518538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 18:22:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221111#M518538</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2016-12-07T18:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221112#M518539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did not work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 18:23:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221112#M518539</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2016-12-07T18:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221113#M518540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr(If(FirstSortedValue(TOTAL &amp;lt;Principal, QSSCAT&amp;gt; DISTINCT VISIT, -Date) = VISIT, Avg(Value)), Principal, QSSCAT, VISIT))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 18:49:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221113#M518540</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-07T18:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221114#M518541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You so Much. This have the maximum difficult nivel. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 19:28:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-FirstSortedValue/m-p/1221114#M518541</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2016-12-07T19:28:59Z</dc:date>
    </item>
  </channel>
</rss>

