<?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: Calculation of specific quarter dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-of-specific-quarter-dates/m-p/1338264#M412566</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this: ceil(month(DATE - 9) / 3) as Quarter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Apr 2017 13:20:44 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2017-04-28T13:20:44Z</dc:date>
    <item>
      <title>Calculation of specific quarter dates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-specific-quarter-dates/m-p/1338263#M412565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to calculate specific quarter dates for a filter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I run the report within the first 9 days of a quarter I want to filter automatically the previous quarter and from the 10th day the current quarter should be selected. I want to use this filter in NPrinting for a Report distribution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found already an example which is working almost as whished by selecting a specific date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Ceil&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;9,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;QuarterStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,-1)) )/3) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or by selecting the current day:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Ceil&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())&amp;gt;9,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;QuarterStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),-1)) )/3) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TODAY_Quarter&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The problem with these examples is, if I select e.g. the 8th May or the 8th June, the function is also selecting the previous quarter.&lt;/P&gt;&lt;P&gt;But I want only within the first 9 days of the quarter (e.g. from the 1st March until the 9th March) the previous quarter selected. From the 10th March until the quarter end (31th March) the current quarter should be selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone an idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance and best regards,&lt;/P&gt;&lt;P&gt;Claus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2017 11:15:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-specific-quarter-dates/m-p/1338263#M412565</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-28T11:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of specific quarter dates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-specific-quarter-dates/m-p/1338264#M412566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this: ceil(month(DATE - 9) / 3) as Quarter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2017 13:20:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-specific-quarter-dates/m-p/1338264#M412566</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-04-28T13:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of specific quarter dates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-specific-quarter-dates/m-p/1338265#M412567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution works perfect!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Claus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 06:52:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-specific-quarter-dates/m-p/1338265#M412567</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-02T06:52:26Z</dc:date>
    </item>
  </channel>
</rss>

