<?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 Specify Quarter dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Specify-Quarter-dates/m-p/286393#M497584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my first post as am a little stuck on a date issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a scenario where there are two types of clients and quarterly valutions are done as per dates below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Days per quarter:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Quarterly:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q1 – Ending 31/03/yyyy – 90 &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q2 – Ending 30/06/yyyy – 91&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q3 – Ending 30/09/yyyy – 92&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q4 – Ending 31/12/yyyy - 92&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Quartertax&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q1 – Ending 05/04/yyyy – 95&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q2 – Ending 30/06/yyyy – 86&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q3 – Ending 30/09/yyyy – 92&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q4 – Ending 31/12/yyyy - 92&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;I am unable to figure out a function whereby I can specify the dates in each quarter for past years and futureproofing so that I can assign the correct quarter to the dates within that quarter. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;Sye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Sep 2011 18:20:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-23T18:20:11Z</dc:date>
    <item>
      <title>Specify Quarter dates</title>
      <link>https://community.qlik.com/t5/QlikView/Specify-Quarter-dates/m-p/286393#M497584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my first post as am a little stuck on a date issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a scenario where there are two types of clients and quarterly valutions are done as per dates below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Days per quarter:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Quarterly:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q1 – Ending 31/03/yyyy – 90 &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q2 – Ending 30/06/yyyy – 91&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q3 – Ending 30/09/yyyy – 92&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q4 – Ending 31/12/yyyy - 92&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Quartertax&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q1 – Ending 05/04/yyyy – 95&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q2 – Ending 30/06/yyyy – 86&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q3 – Ending 30/09/yyyy – 92&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;Q4 – Ending 31/12/yyyy - 92&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt;"&gt;I am unable to figure out a function whereby I can specify the dates in each quarter for past years and futureproofing so that I can assign the correct quarter to the dates within that quarter. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;Sye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 18:20:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Specify-Quarter-dates/m-p/286393#M497584</guid>
      <dc:creator />
      <dc:date>2011-09-23T18:20:11Z</dc:date>
    </item>
    <item>
      <title>Specify Quarter dates</title>
      <link>https://community.qlik.com/t5/QlikView/Specify-Quarter-dates/m-p/286394#M497585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I would recommend creating a date table that includes quarters. Pre-creating your date data will have all kinds of benefits not the least of which include simplified development and better performance. Here's a snippet of code that I would use to pre-prepare quarters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;//include all your other date attributes like month, week, day of year, year, etc...&lt;/P&gt;&lt;P&gt;[QuarterID] = convert(INT,convert(varchar(4),datepart(YYYY,getdate()))+convert(varchar(2),datepart(QQ,getdate()))) ,&lt;/P&gt;&lt;P&gt;[Quarter_YYYY-QQ] = convert(varchar(4),datepart(YYYY,getdate()))+'-'+'Q'+convert(varchar(2),datepart(QQ,getdate())) ,&lt;/P&gt;&lt;P&gt;[Quarter_YYYY-Q] = convert(varchar(4),datepart(YYYY,getdate()))+'-'+convert(varchar(2),datepart(QQ,getdate())) ,&lt;/P&gt;&lt;P&gt;[Quarter_QQ-YYYY] = 'Q'+convert(varchar(2),datepart(QQ,getdate()))+'-'+convert(varchar(4),datepart(YYYY,getdate())),&lt;/P&gt;&lt;P&gt;[Quarter_Q-YYYY] = convert(varchar(2),datepart(QQ,getdate()))+'-'+convert(varchar(4),datepart(YYYY,getdate())) ,&lt;/P&gt;&lt;P&gt;[Quarter_QQ] = 'Q'+convert(varchar(2),datepart(QQ,getdate())) ,&lt;/P&gt;&lt;P&gt;[Quarter_Q] = convert(int,datepart(QQ,getdate()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of getDate() you would want to create a script that would loop through days from "startdate" to "finishdate" to pre-build a calendar. However, the above code would work for current day as-is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a related note, you may also want to add offsets (current Q is 0, last Q is -1, prior is -2, etc) to your date table so you can easily do QTD and Current vs Previous evaluations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 18:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Specify-Quarter-dates/m-p/286394#M497585</guid>
      <dc:creator />
      <dc:date>2011-09-23T18:54:18Z</dc:date>
    </item>
  </channel>
</rss>

