<?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: Calculate Previous Months Data using a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436649#M162865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do not hard code any thing make it flexible and dynamic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please see below expression for current month and previos month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; current month :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;year={$(=max(year))}&amp;gt;},month={$(=max(month))}&amp;gt;}amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;previos month :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;year={$(=max(year))}&amp;gt;},month={$(=max(month)-1)}&amp;gt;}amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Mar 2013 13:05:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-03-13T13:05:49Z</dc:date>
    <item>
      <title>Calculate Previous Months Data using a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436648#M162864</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'm really struggling with this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some data that displays some data based on month selected. I would also like to get the data to display the previous months data. In my example I have 2 tables, one has it working if I hard code the month, the other is not working, when I try an use the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate any help you offer with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 12:46:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436648#M162864</guid>
      <dc:creator />
      <dc:date>2013-03-13T12:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Previous Months Data using a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436649#M162865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do not hard code any thing make it flexible and dynamic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please see below expression for current month and previos month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; current month :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;year={$(=max(year))}&amp;gt;},month={$(=max(month))}&amp;gt;}amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;previos month :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;year={$(=max(year))}&amp;gt;},month={$(=max(month)-1)}&amp;gt;}amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 13:05:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436649#M162865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-13T13:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Previous Months Data using a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436650#M162866</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;Thanks for replying so&amp;nbsp; quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We know not to hard code anything, which is what we are trying to avoid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I want to know is why it will work when we hard code the text, but when we use a variable which contains the same value, it does not? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 13:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436650#M162866</guid>
      <dc:creator />
      <dc:date>2013-03-13T13:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Previous Months Data using a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436651#M162867</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 is the attached file for your issue.&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;Udit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 13:41:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436651#M162867</guid>
      <dc:creator>udit_kumar_sana</dc:creator>
      <dc:date>2013-03-13T13:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Previous Months Data using a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436652#M162868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;check the attached file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 14:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436652#M162868</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-03-13T14:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Previous Months Data using a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436653#M162869</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;Thanks for this, I can stop pulling my hair out now!! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 14:15:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436653#M162869</guid>
      <dc:creator />
      <dc:date>2013-03-13T14:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Previous Months Data using a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436654#M162870</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;Thanks for this, I can stop pulling my hair out now!! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 14:20:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436654#M162870</guid>
      <dc:creator />
      <dc:date>2013-03-13T14:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Previous Months Data using a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436655#M162871</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;THank you to everyone thathelped me with this originally. Its been working a treat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I decided to create my dates a different way based on the data instead of a fixed table, which all works fine, but it has broken the way I get the previous data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried all sorts but cant get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate it if someone could help get it working again, and also explain to me why it works, so I have a better understanding if I brake it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 12:17:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-Previous-Months-Data-using-a-variable/m-p/436655#M162871</guid>
      <dc:creator />
      <dc:date>2013-04-24T12:17:57Z</dc:date>
    </item>
  </channel>
</rss>

