<?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 Filtering dates - Grouping quarters etc in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752863#M1045262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all. &lt;/P&gt;&lt;P&gt;I am an absolute beginner, so I am apologizing beforehand if my question sounds stupid or for that matter, a similar question has already been answered on the forum. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I am working on some user level transaction data, which has fields like customer ID, product ID, sales, purchase date etc. &lt;/P&gt;&lt;P&gt;This is the master data set. Now, for my analysis and presentation, I want to specifically work on the last 4 months of the data set. Overall, the purchase dates in the data set ranges for about 20 months. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the necessary date of purchase file for your viewing. I would have uploaded the master data set, but it is unfortunately too large. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As given in this screenshot below, I want to have a filter which doesn't force me to select individual dates, but 4 months together without having to actually scroll and select. &lt;/P&gt;&lt;P&gt;&lt;IMG alt="qlik1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/71342_qlik1.PNG.png" style="width: 620px; height: 332px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arkadeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Nov 2014 09:12:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-15T09:12:08Z</dc:date>
    <item>
      <title>Filtering dates - Grouping quarters etc</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752863#M1045262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all. &lt;/P&gt;&lt;P&gt;I am an absolute beginner, so I am apologizing beforehand if my question sounds stupid or for that matter, a similar question has already been answered on the forum. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I am working on some user level transaction data, which has fields like customer ID, product ID, sales, purchase date etc. &lt;/P&gt;&lt;P&gt;This is the master data set. Now, for my analysis and presentation, I want to specifically work on the last 4 months of the data set. Overall, the purchase dates in the data set ranges for about 20 months. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the necessary date of purchase file for your viewing. I would have uploaded the master data set, but it is unfortunately too large. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As given in this screenshot below, I want to have a filter which doesn't force me to select individual dates, but 4 months together without having to actually scroll and select. &lt;/P&gt;&lt;P&gt;&lt;IMG alt="qlik1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/71342_qlik1.PNG.png" style="width: 620px; height: 332px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arkadeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2014 09:12:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752863#M1045262</guid>
      <dc:creator />
      <dc:date>2014-11-15T09:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering dates - Grouping quarters etc</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752864#M1045263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;you have to use set analysis. Here is a very helpful document to learn set analysis:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4951"&gt;Set Analysis: syntaxes, examples&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2014 10:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752864#M1045263</guid>
      <dc:creator>webpomer</dc:creator>
      <dc:date>2014-11-15T10:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering dates - Grouping quarters etc</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752865#M1045264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this expression as measure:&lt;/P&gt;&lt;P&gt;sum( &lt;EM&gt;{&amp;lt;[DateOfPurchase]={'&amp;gt;$(=addmonths(max([DateOfPurchase])),-4)&amp;lt;=$(=max([DateOfPurchase]))'}&amp;gt;} &lt;/EM&gt;[NetSales])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2014 10:53:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752865#M1045264</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-11-15T10:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering dates - Grouping quarters etc</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752866#M1045265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To simplify this you could also make a flag in the script that shows the four last months. In this case your expression gets simplier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script (in the table with DateOfPurchase):&lt;/P&gt;&lt;P&gt;if(DateOfPurchase &amp;gt;= addmonths(today(),-4),1,0) as Flag_Last4Months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the expression:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Flag_Last4Months={1}&amp;gt;} NetSales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2014 18:22:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752866#M1045265</guid>
      <dc:creator>morgankejerhag</dc:creator>
      <dc:date>2014-11-15T18:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering dates - Grouping quarters etc</title>
      <link>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752867#M1045266</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;one solution could be to generate a Month field during load and to show it in descending order, i.e. the last 4 months will be visible and selectable without scrolling:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_142276_Pic1.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/71363_QlikCommunity_Thread_142276_Pic1.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14160979818252587 jive_macro_code" jivemacro_uid="_14160979818252587"&gt;
&lt;P&gt;LOAD DateofPurchase,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(DateofPurchase) as Year,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekYear(DateofPurchase) as WeekYear,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q'&amp;amp;Ceil(Month(DateofPurchase)/3) as Quarter,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; QuarterName(DateofPurchase) as QuarterName,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(DateofPurchase) as Month,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName(DateofPurchase) as MonthName,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(DateofPurchase) as Week,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekName(DateofPurchase) as WeekName,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(DateofPurchase) as Day,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekDay(DateofPurchase) as WeekDay&lt;/P&gt;
&lt;P&gt;FROM [lib://QlikCommunity_Thread_142276_DateofPurchase.xlsx]&lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&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>Sun, 16 Nov 2014 00:33:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filtering-dates-Grouping-quarters-etc/m-p/752867#M1045266</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-11-16T00:33:22Z</dc:date>
    </item>
  </channel>
</rss>

