<?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: How to reduce ranges fo dates.. with a complication in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-reduce-ranges-fo-dates-with-a-complication/m-p/1249001#M620718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very clever &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Thank you very very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Feb 2017 08:35:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-23T08:35:17Z</dc:date>
    <item>
      <title>How to reduce ranges fo dates.. with a complication</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-reduce-ranges-fo-dates-with-a-complication/m-p/1248999#M620716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have this problem (see attached data):&lt;/P&gt;&lt;P&gt;there is a table with ID and a dimension (C_QUAL) with some ranges of validity dates, where dates, typically, are consecutive. I would like to reduce the number of range choosing the min and the max date for every ID &amp;amp; C_QUAL.&lt;/P&gt;&lt;P&gt;The complication is that some dates are not consecutive: in this case (in red in the file), when the end date of the prevoius record is NOT the start date-1 of the successive record, I have to create a new range, even if C_QUAL is the same.&lt;/P&gt;&lt;P&gt;Is there a simple solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 19:50:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-reduce-ranges-fo-dates-with-a-complication/m-p/1248999#M620716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-22T19:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to reduce ranges fo dates.. with a complication</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-reduce-ranges-fo-dates-with-a-complication/m-p/1249000#M620717</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;maybe one solution might be:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_250972_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/154153_QlikCommunity_Thread_250972_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14878099295352110 jive_text_macro" jivemacro_uid="_14878099295352110"&gt;
&lt;P&gt;tabTemp:&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; START,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C_QUAL&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A class="" data-containerid="-1" data-containertype="-1" data-objectid="267007" data-objecttype="13" href="https://community.qlik.com/servlet/JiveServlet/download/2061-250972-1218614-267007/SAMPLE.xlsx"&gt;https://community.qlik.com/servlet/JiveServlet/download/1218614-267007/SAMPLE.xlsx&lt;/A&gt;&lt;SPAN&gt;] (ooxml, embedded labels, table is Sheet1, filters(Remove(Row, Pos(Top, 1))));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeSum(Peek(RangeNo), -(ID&amp;lt;&amp;gt;Previous(ID) or C_QUAL&amp;lt;&amp;gt;Previous(C_QUAL) or START&amp;lt;&amp;gt;Previous(END)+1)) as RangeNo&lt;/P&gt;
&lt;P&gt;Resident tabTemp&lt;/P&gt;
&lt;P&gt;Order By ID, C_QUAL, START;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table tabTemp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabRanges:&lt;/P&gt;
&lt;P&gt;LOAD RangeNo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Min(START)) as RANGE_START,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Max(END)) as RANGE_END&lt;/P&gt;
&lt;P&gt;Resident table1&lt;/P&gt;
&lt;P&gt;Group By RangeNo;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 00:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-reduce-ranges-fo-dates-with-a-complication/m-p/1249000#M620717</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2017-02-23T00:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to reduce ranges fo dates.. with a complication</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-reduce-ranges-fo-dates-with-a-complication/m-p/1249001#M620718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very clever &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Thank you very very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 08:35:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-reduce-ranges-fo-dates-with-a-complication/m-p/1249001#M620718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-23T08:35:17Z</dc:date>
    </item>
  </channel>
</rss>

