<?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: Issue with expression calculating a figure for last month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733733#M1063412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashfaq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression for current month works so it doesn't need ' or " adding, its when I change it to vLastMonth that I have the issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Oct 2014 10:10:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-01T10:10:04Z</dc:date>
    <item>
      <title>Issue with expression calculating a figure for last month</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733728#M1063407</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 report that shows me the number of orders and lines picked by week, last week, and month but not last month.&lt;/P&gt;&lt;P&gt;I had this report created by a developer for us as part of my training. I am still at a very basic level so cannot understand why my modification isn't working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the variable vLastMonth as =Month(Now())-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then have a text box that has the following in it to display the number of picks for this month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(count( {1 ,&amp;lt;Cal_Year= {$(vCurrentYear)}, Cal_Month = {$(vCurrentMonth)}&amp;gt; } Picks),'#,###')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I copied the text box as an object and pasted as new object and changed the variable vCurrentMonth to the one I had created vLastMonth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the code in my text box reads&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(count( {1 ,&amp;lt;Cal_Year= {$(vCurrentYear)}, Cal_Month = {$(vLastMonth)}&amp;gt; } Picks),'#,###')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However rather than returning the number of picks for last month it is giving me a zero&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated as I don't know where to start to break this down as to why it's not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not getting any script errors when I modify it, I get expression ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 08:33:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733728#M1063407</guid>
      <dc:creator />
      <dc:date>2014-10-01T08:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with expression calculating a figure for last month</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733729#M1063408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try removing the comma, after '1':&amp;nbsp; =num(count( {1 &lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 08:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733729#M1063408</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-10-01T08:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with expression calculating a figure for last month</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733730#M1063409</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;checked the code and there's no , after the 1&lt;/P&gt;&lt;P&gt;my apologies I must have caught the , as I was typing the &amp;lt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 09:59:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733730#M1063409</guid>
      <dc:creator />
      <dc:date>2014-10-01T09:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with expression calculating a figure for last month</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733731#M1063410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if this works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(count( {1 &amp;lt;Cal_Year= {'$(=vCurrentYear)'}, Cal_Month = {'$(=vCurrentMonth)'}&amp;gt; } Picks),'#,###')&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;=num(count( {1 &amp;lt;Cal_Year= {"$(=vCurrentYear)"}, Cal_Month = {"$(=vCurrentMonth)"}&amp;gt; } Picks),'#,###')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 10:04:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733731#M1063410</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-10-01T10:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with expression calculating a figure for last month</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733732#M1063411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then it would be format issue. How does your data in Cal_Month look like? 'Jan', 'Feb'....or numeric-1,2,....If non numeric try to redefine your variable like:&lt;/P&gt;&lt;P&gt;vLastMonth as =Month(AddMonths(Today(),-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then add single quotes in set like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cal_Month = {'$(vLastMonth)'}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 10:05:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733732#M1063411</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-10-01T10:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with expression calculating a figure for last month</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733733#M1063412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashfaq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression for current month works so it doesn't need ' or " adding, its when I change it to vLastMonth that I have the issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 10:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733733#M1063412</guid>
      <dc:creator />
      <dc:date>2014-10-01T10:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with expression calculating a figure for last month</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733734#M1063413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tresesco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Months are displayed as Jan, Feb etc. Changed my variable to match and it returned the information I expected. I didn't need the single quotes in the set analysis though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 10:15:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-expression-calculating-a-figure-for-last-month/m-p/733734#M1063413</guid>
      <dc:creator />
      <dc:date>2014-10-01T10:15:57Z</dc:date>
    </item>
  </channel>
</rss>

