<?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 error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394014#M146924</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnks Jeroen &lt;/P&gt;&lt;P&gt;and speciall thnks to MR &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Sokkorn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;for such detail explaination and quick response&lt;/P&gt;&lt;P&gt;you guys rock now its working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnks once again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 May 2013 09:14:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-22T09:14:44Z</dc:date>
    <item>
      <title>Expression error</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394010#M146920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AOA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wand to to show the change in stock quantity..&lt;/P&gt;&lt;P&gt;whihc is currnet month stock minus previous month stock &lt;/P&gt;&lt;P&gt;where STOCK_NAME is IT STOCK&lt;/P&gt;&lt;P&gt;and STOCK_ID not equal to 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: in my case current month is APR and previous month is FEB because data loaded with the gap of one month.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wrote the expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},MONTH={'APR'},STOCK_ID-={0}&amp;gt;}BAL_QTY) - &lt;/P&gt;&lt;P&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},MONTH={'FEB'},STOCK_ID-={0}&amp;gt;}BAL_QTY) &lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;answer is 970&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHICH IS WORKING FINE but its a hardcorded value for month&lt;/P&gt;&lt;P&gt;i have a variable VMAXMONTH having a value of max month which is APR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i want to put this variable in above expresion &lt;/P&gt;&lt;P&gt;i tried but giving answer is -8840&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whats going wrong is any thing wrong with expresion?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},MONTH=&lt;EM&gt;&lt;STRONG&gt;VMAXMOMTH&lt;/STRONG&gt;&lt;/EM&gt;,STOCK_ID-={0}&amp;gt;}BAL_QTY) - &lt;/P&gt;&lt;P&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},MONTH={'FEB'},STOCK_ID-={0}&amp;gt;}BAL_QTY)&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 06:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394010#M146920</guid>
      <dc:creator />
      <dc:date>2013-05-22T06:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Expression error</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394011#M146921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;STRONG&gt;kinldy read VMAXMOMTH as &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;STRONG&gt;VMAXMONTH&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;, in last expression&lt;/SPAN&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 06:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394011#M146921</guid>
      <dc:creator />
      <dc:date>2013-05-22T06:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expression error</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394012#M146922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shariqqlikview,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;(&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},MONTH={$(&lt;EM&gt;&lt;STRONG&gt;VMAXMOMTH)}&lt;/STRONG&gt;&lt;/EM&gt;,STOCK_ID-={0}&amp;gt;}BAL_QTY) -&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},MONTH={'FEB'},STOCK_ID-={0}&amp;gt;}BAL_QTY)&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 06:35:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394012#M146922</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2013-05-22T06:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Expression error</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394013#M146923</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;Here what I found the error&lt;/P&gt;&lt;P&gt;1. Wrong set analysis syntax&lt;/P&gt;&lt;P&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},&lt;STRONG&gt;MONTH= VMAXMOMTH&lt;/STRONG&gt;,STOCK_ID-={0}&amp;gt;}BAL_QTY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should be&lt;/P&gt;&lt;P&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},&lt;STRONG&gt;MONTH= {$(=VMAXMOMTH)}&lt;/STRONG&gt;,STOCK_ID-={0}&amp;gt;}BAL_QTY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In this case VMAXMOMTH return in number format. Ex. you have max month is Apr then VMAXMOMTH=4 So your set analysis will calculate base on this&lt;/P&gt;&lt;P&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},MONTH={4},STOCK_ID-={0}&amp;gt;}BAL_QTY) ==&amp;gt; That give you wrong target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution&lt;/P&gt;&lt;P&gt;1. Change on variable&lt;/P&gt;&lt;P&gt;VMAXMOMTH = Pick(Max(MONTH), 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Use below set analysis&lt;/P&gt;&lt;P&gt;sum({&amp;lt;STOCK='{'IT DIVISION'},MONTH= {$(=VMAXMOMTH)},STOCK_ID-={0}&amp;gt;}BAL_QTY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 06:49:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394013#M146923</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2013-05-22T06:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Expression error</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394014#M146924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnks Jeroen &lt;/P&gt;&lt;P&gt;and speciall thnks to MR &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Sokkorn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;for such detail explaination and quick response&lt;/P&gt;&lt;P&gt;you guys rock now its working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnks once again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 09:14:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-error/m-p/394014#M146924</guid>
      <dc:creator />
      <dc:date>2013-05-22T09:14:44Z</dc:date>
    </item>
  </channel>
</rss>

