<?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 How to select distinct previous? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-select-distinct-previous/m-p/211895#M66052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then please verify the answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2011 19:50:31 GMT</pubDate>
    <dc:creator>vgutkovsky</dc:creator>
    <dc:date>2011-04-13T19:50:31Z</dc:date>
    <item>
      <title>How to select distinct previous?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-distinct-previous/m-p/211892#M66049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;BR /&gt;data:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Issue, Date, hrs,&lt;BR /&gt; A-100, 1/1/2011, 6&lt;BR /&gt; A-101, 1/1/2011, 10&lt;BR /&gt; A-102, 1/1/2011, 6&lt;BR /&gt; A-101, 1/7/2011, 12&lt;BR /&gt; A-102, 1/7/2011, 4&lt;BR /&gt; A-103, 1/7/2011, 15&lt;BR /&gt; A-103, 1/14/2011, 18&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Trend:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; TDate, Week&lt;BR /&gt; 1/1/2011, 1&lt;BR /&gt; 1/7/2011, 2&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I need to do the following&lt;BR /&gt;calculate the diff in hrs for each date with respect to the previous date&lt;BR /&gt;so that&lt;BR /&gt;when user selects Date 1/14/2011 from a multiselector, the calculated value for diff should be (Hrs for 1/14/2011) - (Hrs for 1/7/2011) and when 1/7/2011 is selected from a multibox, the calculated value for diff should be (Hrs for 1/7/2011) -(Hrs for 1/1/2011)&lt;BR /&gt;&lt;BR /&gt;How can I achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 17:51:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-distinct-previous/m-p/211892#M66049</guid>
      <dc:creator />
      <dc:date>2011-04-12T17:51:02Z</dc:date>
    </item>
    <item>
      <title>How to select distinct previous?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-distinct-previous/m-p/211893#M66050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All things are possible through set analysis &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; First, I would suggest adding an index to your script, similar to what you've done with "Week." Just make sure you actually link it to the data--rename TDate to Date. Then create a variable called vMaxWeek which you would define as follows: =max(Week)-1&lt;/P&gt;&lt;P&gt;Then this code should work for your expression: sum(hrs) - sum({&amp;lt;Date=,Week={'$(vMaxWeek)'}&amp;gt;}hrs)&lt;/P&gt;&lt;P&gt;Note that this won't work within a chart since set analysis is calculated once for an entire chart and ignores dimensions. Meaning, you can't create a chart with Date as a dimension and use the above expression. If you need to do that, you can always use the above() function.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 18:51:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-distinct-previous/m-p/211893#M66050</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-04-12T18:51:43Z</dc:date>
    </item>
    <item>
      <title>How to select distinct previous?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-distinct-previous/m-p/211894#M66051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Its works like magic!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 19:01:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-distinct-previous/m-p/211894#M66051</guid>
      <dc:creator />
      <dc:date>2011-04-13T19:01:56Z</dc:date>
    </item>
    <item>
      <title>How to select distinct previous?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-distinct-previous/m-p/211895#M66052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then please verify the answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 19:50:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-distinct-previous/m-p/211895#M66052</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-04-13T19:50:31Z</dc:date>
    </item>
  </channel>
</rss>

