<?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: Create Current/Previous month flag in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399681#M808206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.33329963684082px;"&gt;if(InMonth(TempDate, &amp;lt;yourdatefield&amp;gt; ,-1), 1, 0) as LastMonthFlag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0433ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0433ff;"&gt;Month&lt;/SPAN&gt;(&lt;SPAN style="color: #941100;"&gt;&amp;lt;yourdatefield&amp;gt;&lt;/SPAN&gt;) = &lt;SPAN style="color: #0433ff;"&gt;Month&lt;/SPAN&gt;(&lt;SPAN style="color: #0433ff;"&gt;now&lt;/SPAN&gt;())-1,1,0) AS LastMonthFlag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Oct 2017 23:12:22 GMT</pubDate>
    <dc:creator>Tanalex</dc:creator>
    <dc:date>2017-10-19T23:12:22Z</dc:date>
    <item>
      <title>Create Current/Previous month flag</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399679#M808204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I'd like to create month flag based on the date field I've.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I can use if(InMonthToDate(TempDate, today(),0), 1, 0) as CurMonthFlag&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;and&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if(InMonth(TempDate, today() ,-1), 1, 0) as LastMonthFlag&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;But instead of today() I want to use my on date/month field&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399679#M808204</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create Current/Previous month flag</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399680#M808205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, can you please explain what you mean by "But instead of today() I want to use my on date/month field"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have another date field in your database (apart from TempDate) that you want to use in the InMonth function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 21:28:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399680#M808205</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2017-10-19T21:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create Current/Previous month flag</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399681#M808206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.33329963684082px;"&gt;if(InMonth(TempDate, &amp;lt;yourdatefield&amp;gt; ,-1), 1, 0) as LastMonthFlag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0433ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0433ff;"&gt;Month&lt;/SPAN&gt;(&lt;SPAN style="color: #941100;"&gt;&amp;lt;yourdatefield&amp;gt;&lt;/SPAN&gt;) = &lt;SPAN style="color: #0433ff;"&gt;Month&lt;/SPAN&gt;(&lt;SPAN style="color: #0433ff;"&gt;now&lt;/SPAN&gt;())-1,1,0) AS LastMonthFlag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 23:12:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399681#M808206</guid>
      <dc:creator>Tanalex</dc:creator>
      <dc:date>2017-10-19T23:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create Current/Previous month flag</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399682#M808207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In synthetically, it should be&lt;/P&gt;&lt;P class="syntax" data-mc-conditions="Primary.NotToTranslate" style="font-size: 16px; margin: 10px 0; background-color: #f4f4f4; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; color: #0f0f0f;"&gt;&lt;SPAN class="script_token" style="font-weight: bold; font-size: 12px;"&gt;InMonth (&lt;/SPAN&gt;&lt;SPAN class="bnf_token" style="font-size: 12px;"&gt;timestamp, base_date, period_no[, first_month_of_year]&lt;/SPAN&gt;&lt;SPAN class="statement" style="font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P class="syntax" data-mc-conditions="Primary.NotToTranslate" style="box-sizing: border-box; font-size: 16px; margin: 10px 0px; background-color: #f4f4f4; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; display: inline-block; color: #0f0f0f;"&gt;&lt;SPAN class="statement" style="box-sizing: border-box; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 01:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399682#M808207</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-10-20T01:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create Current/Previous month flag</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399683#M808208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0433ff;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0433ff;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #941100;"&gt;&amp;lt;yourdatefield&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;) = &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0433ff;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0433ff;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;())-1,1,0) AS LastMonthFlag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;The above expresion givs me Sep as last month which is correct, however it is giving Sep for ll the years. Where I just need Sep from 2015 for example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;There are 2 date fields one is loading until 2017 and another is loading until 2015 and I want to show last month of 2015 only.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2017 12:45:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399683#M808208</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2017-10-23T12:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create Current/Previous month flag</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399684#M808209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 date fields in DB.&lt;BR /&gt;One is loading until 2015 and another until 2017.&lt;/P&gt;&lt;P&gt;Flag is working if I use Today() but there is no data in 2017 previous month.&lt;/P&gt;&lt;P&gt;Rather there is data in 2015 Sep Month which is the last loaded month.&lt;/P&gt;&lt;P&gt;So I like to show last loaded month in 2015 only as a flag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2017 12:47:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399684#M808209</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2017-10-23T12:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create Current/Previous month flag</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399685#M808210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The fields inside your expression are confusing to me...&lt;/P&gt;&lt;P&gt;I do not have those fields in my table&lt;/P&gt;&lt;P&gt;Period no maybe I have it but rest?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2017 12:48:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399685#M808210</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2017-10-23T12:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create Current/Previous month flag</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399686#M808211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use a variable to indicate what you consider to be the current month. Either tie this variable to an input field annex calendar to make it easy to modify its value. Note that variables keep their values throughout reloads if the load script doesn't change them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or in your load script, start by calculating the "Current Month" based on what data you are loading and/or chat data is of interest to you. Then store that date in the same variable and proceed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2017 13:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Current-Previous-month-flag/m-p/1399686#M808211</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-23T13:07:35Z</dc:date>
    </item>
  </channel>
</rss>

