<?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: Current Year and Month Indicator in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Month-Indicator/m-p/833174#M293163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See if it helps:&lt;/P&gt;&lt;P&gt;Month(Today() AS CurrentMonth,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Month() is dual, no need for num&lt;/P&gt;&lt;P&gt;IF(monthstart(TempDate) = monthstart(today()),1,0) AS CurrentMonthIND,&lt;/P&gt;&lt;P&gt;IF(monthstart(TempDate) = monthstart(today(),-1),1,0)&amp;nbsp; AS PreviousMonthIND,&lt;/P&gt;&lt;P&gt;IF(weekstart(TempDate) = weekstart(today(),-1),1,0) as PreviousWeekIND,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 May 2015 16:09:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-05-22T16:09:39Z</dc:date>
    <item>
      <title>Current Year and Month Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Month-Indicator/m-p/833172#M293161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my master calendar i'm creating an indicator to determine if the daily load is in the current month, previous month, previous week, and previous 4 weeks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My indicators are working correctly, but the problem is I only want them for the current year not every year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Standard Date Objects&lt;/P&gt;&lt;P&gt;Day(TempDate) AS CalendarDayOfMonth, &lt;/P&gt;&lt;P&gt;WeekDay(TempDate) AS CalendarDayName, &lt;/P&gt;&lt;P&gt;Week(TempDate) AS CalendarWeekOfYear, &lt;/P&gt;&lt;P&gt;Month(TempDate) AS CalendarMonthName, &lt;/P&gt;&lt;P&gt;'Q' &amp;amp; Ceil(Month(TempDate)/3) AS CalendarQuarter, &lt;/P&gt;&lt;P&gt;Year(TempDate) AS CalendarYear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(Month(Today())) AS CurrentMonth,&lt;/P&gt;&lt;P&gt;IF(TempDate &amp;lt;=Today() AND Num(Month(TempDate)) = Num(Month(Today())),1,0) AS CurrentMonthIND,&lt;/P&gt;&lt;P&gt;Num(month(AddMonths(Today(),-1))) AS PreviousMonth,&lt;/P&gt;&lt;P&gt;IF(TempDate &amp;lt;=Today() AND Num(Month(TempDate)) = Num(month(AddMonths(Today(),-1))),1,0) AS PreviousMonthIND,&lt;/P&gt;&lt;P&gt;Date(Num(Date(Today(),'DD/MM/YYYY')-7)) AS PreviousWeek,&lt;/P&gt;&lt;P&gt;if((TempDate &amp;lt;= today() and TempDate &amp;gt;= weekstart(today()-7)),1,0) as PreviousWeekIND,&lt;/P&gt;&lt;P&gt;Date(Num(Date(Today(),'DD/MM/YYYY')-28)) AS Previous4Weeks,&lt;/P&gt;&lt;P&gt;if((TempDate &amp;lt;= today() and TempDate &amp;gt;= weekstart(today()-28)),1,0) as Previous4WeeksIND,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempDate is derived from a resident load&lt;/P&gt;&lt;P&gt;TempCalendar: &lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;$(vDateMin) + RowNo() - 1 AS DateNumber, &lt;/P&gt;&lt;P&gt;Date($(vDateMin) + RowNo() - 1) AS TempDate &lt;/P&gt;&lt;P&gt;AUTOGENERATE 1 &lt;/P&gt;&lt;P&gt;WHILE $(vDateMin)+IterNo()-1&amp;lt;= $(vDateMax);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2015 15:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Month-Indicator/m-p/833172#M293161</guid>
      <dc:creator>NickHoff</dc:creator>
      <dc:date>2015-05-22T15:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Month Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Month-Indicator/m-p/833173#M293162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the InMonth and InYear functions instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InMonth(TempDate, today()) as IsCurrentMonth&lt;/P&gt;&lt;P&gt;InMonth(TempDate, today(), -1) as IsPreviousMonth&lt;/P&gt;&lt;P&gt;InYear(TempDate, today()) as IsCurrentYear&lt;/P&gt;&lt;P&gt;InYear(TempDate, today(), -1) as IsPreviousYear&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2015 16:00:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Month-Indicator/m-p/833173#M293162</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-05-22T16:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Month Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Month-Indicator/m-p/833174#M293163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See if it helps:&lt;/P&gt;&lt;P&gt;Month(Today() AS CurrentMonth,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Month() is dual, no need for num&lt;/P&gt;&lt;P&gt;IF(monthstart(TempDate) = monthstart(today()),1,0) AS CurrentMonthIND,&lt;/P&gt;&lt;P&gt;IF(monthstart(TempDate) = monthstart(today(),-1),1,0)&amp;nbsp; AS PreviousMonthIND,&lt;/P&gt;&lt;P&gt;IF(weekstart(TempDate) = weekstart(today(),-1),1,0) as PreviousWeekIND,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2015 16:09:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Month-Indicator/m-p/833174#M293163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-22T16:09:39Z</dc:date>
    </item>
  </channel>
</rss>

