<?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: Previous Month Sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-Month-Sum/m-p/875939#M305895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, GLFileDate seems to be a date field and you are comparing date field to just a month. You probably would need to do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({$&amp;lt;GLFileDate={"=Month(GLFileDate) = $(vPriorMonth)'}&amp;gt;}[Closing Balance USD])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jun 2015 18:14:46 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-06-22T18:14:46Z</dc:date>
    <item>
      <title>Previous Month Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Sum/m-p/875938#M305894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to sum the dollar amount of the Previous Month based on the selected date(GLFileDate).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I set up a variable for PriorMonth&lt;BR /&gt;&amp;nbsp; &lt;EM&gt;&amp;nbsp; (vPriorMonth)- =month(addmonths(max(GLFileDate),-1))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set an expression below, but it returns &lt;STRONG&gt;$0.00&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;=sum({$&amp;lt;GLFileDate=($(vPriorMonth))&amp;gt;}[Closing Balance USD])&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I am able to get the Expression title to render the previous month, so I think the variables that I set up are functioning properly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;EM&gt; &lt;SPAN style="font-size: 8pt;"&gt; ='Previous Month:&amp;nbsp; &lt;/SPAN&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;EM style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vPriorMonth) $(vMaxDay), $(vPriorMonthYear)'&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;returns Previous Month: May 15, 2015 when 6/15/2015 is selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 17:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Sum/m-p/875938#M305894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-22T17:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Sum/m-p/875939#M305895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, GLFileDate seems to be a date field and you are comparing date field to just a month. You probably would need to do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({$&amp;lt;GLFileDate={"=Month(GLFileDate) = $(vPriorMonth)'}&amp;gt;}[Closing Balance USD])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 18:14:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Sum/m-p/875939#M305895</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-22T18:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Sum/m-p/875940#M305896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you can set your variable definition as this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vPriorMonth =Date(AddMonths(Max(GLFileDate),-1), '&lt;/STRONG&gt;sameDateFormatasGLFileDate&lt;STRONG&gt;')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({$&amp;lt;GLFileDate={"$(vPriorMonth)"}&amp;gt;}[Closing Balance USD])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 18:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Sum/m-p/875940#M305896</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-22T18:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Sum/m-p/875941#M305897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny- this worked!&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Or you can set your variable definition as this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vPriorMonth =Date(AddMonths(Max(GLFileDate),-1), '&lt;/STRONG&gt;sameDateFormatasGLFileDate&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and then use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;=Sum({$&amp;lt;GLFileDate={"$(vPriorMonth)"}&amp;gt;}[Closing Balance USD])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 18:26:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Sum/m-p/875941#M305897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-22T18:26:11Z</dc:date>
    </item>
  </channel>
</rss>

