<?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: Date Field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205894#M387603</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be look here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2015/05/better-calendar-scripts/" title="http://qlikviewcookbook.com/2015/05/better-calendar-scripts/"&gt;Better Calendar Scripts | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Nov 2016 19:58:01 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-11-02T19:58:01Z</dc:date>
    <item>
      <title>Date Field</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205890#M387599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a field called 'Created' which is a date and time field, for example 6/9/16 3:09 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data centers around the submissions of projects through a ticket system. So, for every ticket submitted there is a Created time stamp. I am attempting to chart out the submission by month and year. How can I manipulate this field to do that? In other words, my problem currently is that when I attempt to create a chart, each of the tickets are their own data point because they all have unique time stamps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:29:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205890#M387599</guid>
      <dc:creator>evansabres</dc:creator>
      <dc:date>2016-11-02T19:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Date Field</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205891#M387600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, extract a [Created Date] from that field in script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;daystart([Created]) as [Created Date],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create a master calendar on [Created Date] that has a [Created Month] and [Created Year]. Now you can use these fields as dimensions and count tickets by those dimensions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:36:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205891#M387600</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-02T19:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date Field</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205892#M387601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John, thank you, how do you create a master calendar?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:39:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205892#M387601</guid>
      <dc:creator>evansabres</dc:creator>
      <dc:date>2016-11-02T19:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Date Field</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205893#M387602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure there are a number of guides, but once you've loaded in your main data, this might do the trick:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Calendar:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(monthstart([Created Date]),'MMM YYYY') as [Created Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(yearstart([Created Date]),'YYYY') as [Created Year]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(fieldvalue('Created Date',recno())) as [Created Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('Created Date')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:55:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205893#M387602</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-02T19:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date Field</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205894#M387603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be look here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2015/05/better-calendar-scripts/" title="http://qlikviewcookbook.com/2015/05/better-calendar-scripts/"&gt;Better Calendar Scripts | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205894#M387603</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-02T19:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date Field</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205895#M387604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, my script assumed we didn't need any dates in the calendar that aren't in the data, which is often the case. If not, you can go from min to max. Untested, but:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;MinMax:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; min([Created Date]) as Min&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,max([Created Date]) as Max&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(fieldvalue('Created Date',recno())) as [Created Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('Created Date')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vMin = peek('Min');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vMax = peek('Max');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DROP TABLE MinMax;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Calendar:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(monthstart([Created Date]),'MMM YYYY') as [Created Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(yearstart([Created Date]),'YYYY') as [Created Year]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD $(vMin)+recno()-1 as [Created Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE $(vMax)-$(vMin)+1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that Rob was saying that peek() is dangerous, but I just read the QVC script for the same function, and it uses peek. So... I guess he was just saying it was easy to typo something, and if you use QVC it's been carefully tested and doesn't have that sort of typo in that piece of script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Honestly, why I haven't started using QVC, I have no idea. It's such a good idea, and it's probably been mature and reliable for a long time. So yeah, there's one answer. "Want to create a master calendar? Get QlikView Components!". &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 20:21:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205895#M387604</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-02T20:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date Field</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205896#M387605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wait, why do we even bother with min and max variables? What's wrong with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Calendar:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(monthstart([Created Date]),'MMM YYYY') as [Created Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(yearstart([Created Date]),'YYYY') as [Created Year]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(fieldvalue('Created Date',recno()))+iterno()-1 as [Created Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('Created Date')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHILE recno() &amp;lt; fieldvaluecount('Created Date')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; AND date(fieldvalue('Created Date',recno()))+iterno()-1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt; date(fieldvalue('Created Date',recno()+1))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like it would work with no variables required. Or we could do it by first building the dates we have, then filling in the blanks. Might be easier to read, even if slightly longer. I need to do some testing. Also searching the forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit: Because fieldvalue() doesn't return in numeric sequence...&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 20:35:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205896#M387605</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-02T20:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date Field</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205897#M387606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, here we go. Use Henric's approach, but with fieldvalue() instead of a resident load, and we get something nice and short, no variables, and it should be fast. I'm sure I'm only the latest person to reinvent this wheel, but no more variables and peek() for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Calendar:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(monthstart(Date),'MMM YYYY') as Month&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(yearstart(Date),'YYYY') as Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&amp;nbsp; Min+iterno()-1 as Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHILE Min+iterno()-1 &amp;lt;= Max&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD min(fieldvalue('Date',recno())) as Min&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp; max(fieldvalue('Date',recno())) as Max&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('Date')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2802"&gt;The Master Calendar&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 21:16:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205897#M387606</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-02T21:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Date Field</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205898#M387607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahhhhh, looks like this is the method used by &lt;A href="https://community.qlik.com/qlik-users/2122"&gt;seebach&lt;/A&gt; in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-6662"&gt;The Fastest Dynamic Calendar Script (Ever)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, if I'm going to reinvent the wheel, the fastest wheel (ever) is a good one to reinvent. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 21:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Field/m-p/1205898#M387607</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-02T21:57:15Z</dc:date>
    </item>
  </channel>
</rss>

