<?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: Setting Master Calendar for Current Month and Previous Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Setting-Master-Calendar-for-Current-Month-and-Previous-Month/m-p/1431158#M802593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would put this into your script and see if this returns the results you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inmonth(Date, Today() , -1)&amp;nbsp; as [Current Month]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should get a "-1" for last month.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Last month.JPG" class="jive-image image-1" src="/legacyfs/online/184095_Last month.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;If you want to create a filter for Current Month, you can use an IF statement.&amp;nbsp; If you want to use a 1/0, just multiply the formula by a -1 and that should turn the results positive.&amp;nbsp; If you want to find the month prior, just use the following formula...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;inmonth(Date, Today() , -2)&amp;nbsp; as [prior Month]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Nov 2017 21:57:55 GMT</pubDate>
    <dc:creator>hallquist_nate</dc:creator>
    <dc:date>2017-11-21T21:57:55Z</dc:date>
    <item>
      <title>Setting Master Calendar for Current Month and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-Master-Calendar-for-Current-Month-and-Previous-Month/m-p/1431157#M802592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data file with separate columns for Month and Year (i.e., there is no combined field that concatenates the two together) which is causing a bit of difficulty when trying to establish a master calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically all of my data is from a prior month, for example if today's month is November, my latest data (known as our "current" data) will be from October.&amp;nbsp; If this month is December, our "current" data will actually be from November, and so on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I set a variable to make the "current" month match my data source?&amp;nbsp; In other words, even though today's month is actually November, I want my current month to read October, because that is the last month of data we have in our system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously what I then need would be a "prior" month variable (showing September in the above example). &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/Setting-Master-Calendar-for-Current-Month-and-Previous-Month/m-p/1431157#M802592</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Master Calendar for Current Month and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-Master-Calendar-for-Current-Month-and-Previous-Month/m-p/1431158#M802593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would put this into your script and see if this returns the results you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inmonth(Date, Today() , -1)&amp;nbsp; as [Current Month]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should get a "-1" for last month.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Last month.JPG" class="jive-image image-1" src="/legacyfs/online/184095_Last month.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;If you want to create a filter for Current Month, you can use an IF statement.&amp;nbsp; If you want to use a 1/0, just multiply the formula by a -1 and that should turn the results positive.&amp;nbsp; If you want to find the month prior, just use the following formula...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;inmonth(Date, Today() , -2)&amp;nbsp; as [prior Month]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 21:57:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-Master-Calendar-for-Current-Month-and-Previous-Month/m-p/1431158#M802593</guid>
      <dc:creator>hallquist_nate</dc:creator>
      <dc:date>2017-11-21T21:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Master Calendar for Current Month and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-Master-Calendar-for-Current-Month-and-Previous-Month/m-p/1431159#M802594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nate.&amp;nbsp; I have incorporated that into my script, but am still experiencing some issues, particularly when I try to use an IF statement in my charts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following IF statement: =&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CurrentMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;= -1, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;JRNL_LINE_CNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&amp;nbsp; ' ' )&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;because I don't want to return any values if the data does not fall within the CurrentMonth (hopefully that makes sense).&amp;nbsp;&amp;nbsp; What is happening is that I am getting an error that shows no data at all.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;IMG alt="2017-11-22 07_41_54-QlikView x64 Personal Edition - [C__Users_e9912853_Desktop_ISIC MJE Visualizatio.png" class="jive-image image-1" src="/legacyfs/online/184204_2017-11-22 07_41_54-QlikView x64 Personal Edition - [C__Users_e9912853_Desktop_ISIC MJE Visualizatio.png" style="width: 620px; height: 272px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Any ideas what I'm doing wrong? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 12:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-Master-Calendar-for-Current-Month-and-Previous-Month/m-p/1431159#M802594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-22T12:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Master Calendar for Current Month and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-Master-Calendar-for-Current-Month-and-Previous-Month/m-p/1431160#M802595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Claire,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would flag them in your master calendar,&lt;/P&gt;&lt;P&gt;Depends on how your data is laid out, but you will want something like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(MONTH(DATE) = MONTH(ADDMONTH(TODAY(),-1)),1,0) AS CurrentMonthFlag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then your set Analysis for the sum of current month would be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;CurrentMonthFlag={1}&amp;gt;}JNRL_LINE_CNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 13:29:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-Master-Calendar-for-Current-Month-and-Previous-Month/m-p/1431160#M802595</guid>
      <dc:creator>Mark_Little</dc:creator>
      <dc:date>2017-11-22T13:29:37Z</dc:date>
    </item>
  </channel>
</rss>

