<?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 Problem with expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281549#M104728</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;Simply you could do one thing in the front end only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make variable name as VMaxMonthtest= month(﻿num(vMaxMonth)-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this variable in your expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nitin Jain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Dec 2011 11:45:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-12-06T11:45:58Z</dc:date>
    <item>
      <title>Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281541#M104720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Hi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;My expression -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum({&amp;lt;Year={$(vMaxYear)},Date={'&amp;lt;=$(vMaxDate)'},Month={$(vMaxMonth)},Drawer={'7'}&amp;gt;}JrnAmt)&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;is giving me the correct sum for journals for Nov 2011. However when I change the expression to -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum({&amp;lt;Year={$(vMaxYear)},Date={'&amp;lt;=$(vMaxDate)'},Month&lt;SPAN style="color: #ff0000;"&gt;={$(vMaxMonth-1)},&lt;/SPAN&gt;Drawer={'7'}&amp;gt;}JrnAmt)&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which I hoped would give me the value for Oct 2011, it doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried this - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;sum({&amp;lt;Year={$(vMaxYear)},Date={'&amp;lt;=$(vMaxDate)'},Month={$((vMaxMonth)-1)},Drawer={'4'}&amp;gt;}JrnAmt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #333333; font-size: 10pt;"&gt;How can I fix this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #333333; font-size: 10pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Danie&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #333333; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 08:19:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281541#M104720</guid>
      <dc:creator />
      <dc:date>2011-12-06T08:19:35Z</dc:date>
    </item>
    <item>
      <title>Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281542#M104721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Untested:&lt;/P&gt;&lt;P&gt;Have you also tried:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;sum({&amp;lt;Year={$(vMaxYear)},Date={'&amp;lt;=$(vMaxDate)'},Month={$(vMaxMonth)-1},Drawer={'4'}&amp;gt;}JrnAmt) ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 08:53:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281542#M104721</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2011-12-06T08:53:16Z</dc:date>
    </item>
    <item>
      <title>Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281543#M104722</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;Please check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does &lt;SPAN style="color: #000000; font-size: 10pt;"&gt;vMaxMonth variable holds, it holds Month name or number?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;What values the Month column hlods, it holds Month names or numbers?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Check whether Month column and vMaxMonth holds month numbers. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Attach a sample, it would be easier to find and fix the issue.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 08:57:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281543#M104722</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2011-12-06T08:57:40Z</dc:date>
    </item>
    <item>
      <title>Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281544#M104723</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;Yes I tried that one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 09:30:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281544#M104723</guid>
      <dc:creator />
      <dc:date>2011-12-06T09:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281545#M104724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm adding the model for you to peruse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it asks for username and pw it is 'xbi' and 'xbi01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Danie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 09:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281545#M104724</guid>
      <dc:creator />
      <dc:date>2011-12-06T09:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281546#M104725</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;Add one more column in your script to hold Month number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month(RefDate) * 1 as MonthNum - this will return month number instead of month name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable should be &lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;vMaxMonth&lt;/SPAN&gt; =Max(MonthKey)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and now expression should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum({&amp;lt;Year={$(vMaxYear)},Date={'&amp;lt;=$(vMaxDate)'},MonthKey&lt;SPAN style="color: #ff0000;"&gt;={$(vMaxMonth-1)},&lt;/SPAN&gt;Drawer={'7'}&amp;gt;}JrnAmt) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum({&amp;lt;Year={$(vMaxYear)},Date={'&amp;lt;=$(vMaxDate)'},&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;MonthKey&lt;SPAN style="color: #ff0000;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={$(vMaxMonth)},Drawer={'7'}&amp;gt;}JrnAmt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 10:34:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281546#M104725</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2011-12-06T10:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281547#M104726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Jagan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a bit confused - We now have 'MonthNum' but where does 'MonthKey' come from?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 11:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281547#M104726</guid>
      <dc:creator />
      <dc:date>2011-12-06T11:04:56Z</dc:date>
    </item>
    <item>
      <title>Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281548#M104727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry!&amp;nbsp; Use MonthNum in place of &lt;SPAN style="font-size: 10pt;"&gt;MonthKey.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 11:16:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281548#M104727</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2011-12-06T11:16:36Z</dc:date>
    </item>
    <item>
      <title>Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281549#M104728</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;Simply you could do one thing in the front end only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make variable name as VMaxMonthtest= month(﻿num(vMaxMonth)-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this variable in your expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nitin Jain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 11:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281549#M104728</guid>
      <dc:creator />
      <dc:date>2011-12-06T11:45:58Z</dc:date>
    </item>
    <item>
      <title>Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281550#M104729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked your expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(vMaxMonth)-1 returns 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when you pass 10 to Month(), it gives Jan, because the date(10 in number format) will fall in Jan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 12:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281550#M104729</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2011-12-06T12:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281551#M104730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed your suggestion and it now shows the month no (eg 12 for Dec) and the expression works for vMaxMonth&lt;/P&gt;&lt;P&gt;but not for vMaxMonth-1 so I'm back to square 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attaching the model again - won't you please have a look if it's something I'm doing wrong in the expression please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Danie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 12:13:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression/m-p/281551#M104730</guid>
      <dc:creator />
      <dc:date>2011-12-07T12:13:06Z</dc:date>
    </item>
  </channel>
</rss>

