<?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: Expression issue for previous month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-issue-for-previous-month/m-p/1547182#M746059</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If you use the field Month as dimension in your chart, you can't show the previous month with set analysis. You have to create the field inside the script&lt;BR /&gt;&lt;BR /&gt;If you want create a chart with other dimensions (not like Month or any field of time) you can try this:&lt;BR /&gt;In your Master calendar define&lt;BR /&gt;((Year([Date Closed])-1)*12 + Num(Month([Date Closed]))) as Month_ID&lt;BR /&gt;&lt;BR /&gt;and set analysis&lt;BR /&gt;=Count({$&amp;lt; Month_ID = {$(=Max(Month_ID-1))},RFT = {'YES'}&amp;gt;} RFT)&lt;BR /&gt;&lt;BR /&gt;I hope it will work&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;ACC&lt;BR /&gt;</description>
    <pubDate>Thu, 21 Feb 2019 05:20:28 GMT</pubDate>
    <dc:creator>andrescc</dc:creator>
    <dc:date>2019-02-21T05:20:28Z</dc:date>
    <item>
      <title>Expression issue for previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-issue-for-previous-month/m-p/1547010#M746056</link>
      <description>&lt;P&gt;My source date field is&lt;/P&gt;&lt;P&gt;[Date Closed]&lt;/P&gt;&lt;P&gt;I have a master calendar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I define MonthName([Date Closed]) as Month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I select Feb 2019 on my chart, list, etc&lt;/P&gt;&lt;P&gt;I would like to display the value from the previous month&lt;/P&gt;&lt;P&gt;I have tried various options.&lt;/P&gt;&lt;P&gt;I have a variable&lt;/P&gt;&lt;P&gt;vPrevMonth = Month-1&lt;/P&gt;&lt;P&gt;vPrevMonth displays Jan 2019 so is working correct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my expression is&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Month={'$(vPrevMonth)'},RFT = {'YES'}&amp;gt;} RFT)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;Month={$(vPrevMonth)},RFT = {'YES'}&amp;gt;} RFT)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just cant get it to work&lt;/P&gt;&lt;P&gt;anyone with any pointers&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-issue-for-previous-month/m-p/1547010#M746056</guid>
      <dc:creator>spikenaylor1</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expression issue for previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-issue-for-previous-month/m-p/1547023#M746057</link>
      <description>Can you create something like this in your data model mastercalendar like&lt;BR /&gt;&lt;BR /&gt;LOAD *,&lt;BR /&gt;MonthName([Date Closed]) as Month,&lt;BR /&gt;Floor(MonthName([Date Closed])) as Month#&lt;BR /&gt;From Mastercalendar;&lt;BR /&gt;&lt;BR /&gt;Then create variable&lt;BR /&gt;LET vPrevMonth = [Month#]-1;&lt;BR /&gt;&lt;BR /&gt;Then use your expr like&lt;BR /&gt;&lt;BR /&gt;=Count({&amp;lt;[Month#]={$(vPrevMonth)},RFT = {'YES'}&amp;gt;} RFT)&lt;BR /&gt;OR&lt;BR /&gt;=Count({&amp;lt;[Month#]={'$(vPrevMonth)'},RFT = {'YES'}&amp;gt;} RFT)&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Feb 2019 16:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-issue-for-previous-month/m-p/1547023#M746057</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2019-02-20T16:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Expression issue for previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-issue-for-previous-month/m-p/1547083#M746058</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;=Count({&amp;lt;Month = {"$(=MonthName(AddMonths(Max(Month), -1)))"}, RFT = {'YES'}&amp;gt;} RFT)&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Feb 2019 19:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-issue-for-previous-month/m-p/1547083#M746058</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-20T19:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Expression issue for previous month</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-issue-for-previous-month/m-p/1547182#M746059</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If you use the field Month as dimension in your chart, you can't show the previous month with set analysis. You have to create the field inside the script&lt;BR /&gt;&lt;BR /&gt;If you want create a chart with other dimensions (not like Month or any field of time) you can try this:&lt;BR /&gt;In your Master calendar define&lt;BR /&gt;((Year([Date Closed])-1)*12 + Num(Month([Date Closed]))) as Month_ID&lt;BR /&gt;&lt;BR /&gt;and set analysis&lt;BR /&gt;=Count({$&amp;lt; Month_ID = {$(=Max(Month_ID-1))},RFT = {'YES'}&amp;gt;} RFT)&lt;BR /&gt;&lt;BR /&gt;I hope it will work&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;ACC&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Feb 2019 05:20:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-issue-for-previous-month/m-p/1547182#M746059</guid>
      <dc:creator>andrescc</dc:creator>
      <dc:date>2019-02-21T05:20:28Z</dc:date>
    </item>
  </channel>
</rss>

