<?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: Calendar Script (This month a year ago) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819490#M664445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;December 2013 was just an example. You should use your own Date field as you apparently figured out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jan 2015 16:36:47 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2015-01-06T16:36:47Z</dc:date>
    <item>
      <title>Calendar Script (This month a year ago)</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819485#M664437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had a search through various threads but can't quite find what I want. I have a calendar script set up to return 1 or 0 for various date conditions but I'm missing a couple and I hope someone can help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;if(InYearToDate (Date, today(),0,4),1,0)&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;as Dates_FYTD_TY (Returns 1 for all dates in this financial year to date (starting in April)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(InYearToDate (Date, today(),-1,4),1,0)&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;as Dates_FYTD_LY,(Returns 1 for all dates in previous financial year to date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;if(InMonthToDate(Date, today(), -1),1,0)&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;All dates last month&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to now return a 1 or 0 for: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any dates that are the previous year of the last month (in context of this that would be December 2013. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 17:06:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819485#M664437</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2015-01-05T17:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Script (This month a year ago)</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819486#M664438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it would be InMonthToDate uisng an offset of -13. You may have to adjust that number for your fiscal year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=InMonthToDate(makeDate(2013,12,1),today(),-13)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com" rel="nofollow"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 18:00:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819486#M664438</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-01-05T18:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Script (This month a year ago)</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819487#M664439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an FYI - using InMonthToDate would give you only till today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(InMonthToDate(Date, today(), -1),1,0)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dates till today of last Month (If today is 1/5/2015 then you would get 12/1/2014 to 12/5/2014)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 19:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819487#M664439</guid>
      <dc:creator />
      <dc:date>2015-01-05T19:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Script (This month a year ago)</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819488#M664442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good point. To get the full previous month, insert MonthEnd() like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=InMonthToDate(makeDate(2013,12,31),MonthEnd(today(1)),-13)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 19:24:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819488#M664442</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-01-05T19:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Script (This month a year ago)</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819489#M664444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your responses. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldn't quite get it to work using IF(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;InMonthToDate(makeDate(2013,12,31),MonthEnd(today(1)),-13),1,0) it just returned a 1 all the time - it's probably me not understanding the funtion correctly to be fair. (I also don't want to hard code December 2013 either sorry if I didn't make that clear)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the key is the 13 months though as I find the following solution seems to now work: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(InMonthToDate(Date, today(), -13),1,0)&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 09:36:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819489#M664444</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2015-01-06T09:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Script (This month a year ago)</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819490#M664445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;December 2013 was just an example. You should use your own Date field as you apparently figured out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:36:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-Script-This-month-a-year-ago/m-p/819490#M664445</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-01-06T16:36:47Z</dc:date>
    </item>
  </channel>
</rss>

