<?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: How to show Previous Month and Last Year Previous Month in a straight table? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974146#M467005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Liron! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply! Where would I create a monthyear field? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Dec 2015 15:59:38 GMT</pubDate>
    <dc:creator>neena123</dc:creator>
    <dc:date>2015-12-22T15:59:38Z</dc:date>
    <item>
      <title>How to show Previous Month and Last Year Previous Month in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974144#M467003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to display the sales for Previous Month and Last Year Previous Month. Nothing seems to work for me. I also have some conditions that the sales needs to be summed up by. &lt;/P&gt;&lt;P&gt;My expression for Last Year Previous Month&lt;/P&gt;&lt;P&gt;SUM(MonthStart(Today()-13) AND IF(MATCH([Object Account],'5311','5312','5314','5315','5317') ,Sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression for Current Year Previous Month&lt;/P&gt;&lt;P&gt;SUM(MonthStart(Today()-1) AND IF(MATCH([Object Account],'5311','5312','5314','5315','5317') ,Sales))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 15:45:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974144#M467003</guid>
      <dc:creator>neena123</dc:creator>
      <dc:date>2015-12-22T15:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Previous Month and Last Year Previous Month in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974145#M467004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi you need to tweek your expressions like that&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SUM({&amp;lt;MonthField={"$(=MonthStart(addmonths(Today(),-13)))"}&amp;gt;} IF(MATCH([Object Account],'5311','5312','5314','5315','5317') ,Sales))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;and &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;for previous month &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SUM({&amp;lt;MonthField={"$(=MonthStart(addmonths(Today(),-1)))"}&amp;gt;} IF(MATCH([Object Account],'5311','5312','5314','5315','5317') ,Sales))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;in order for this to work &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;you need to create a monthyear field that hold the&amp;nbsp; month start date for each date &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 15:57:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974145#M467004</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-12-22T15:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Previous Month and Last Year Previous Month in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974146#M467005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Liron! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply! Where would I create a monthyear field? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 15:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974146#M467005</guid>
      <dc:creator>neena123</dc:creator>
      <dc:date>2015-12-22T15:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Previous Month and Last Year Previous Month in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974147#M467006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create that field in the same table where the date field is &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 16:37:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974147#M467006</guid>
      <dc:creator>miguelbraga</dc:creator>
      <dc:date>2015-12-22T16:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Previous Month and Last Year Previous Month in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974148#M467007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It did not work for me. Thanks though!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 18:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974148#M467007</guid>
      <dc:creator>neena123</dc:creator>
      <dc:date>2015-12-22T18:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Previous Month and Last Year Previous Month in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974149#M467008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;some test data&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Calendar:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; 12*(Year(Today())-Year(Date)) + Month(Today()) - Month(Date) as MonthsAgo;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; date(MakeDate(2014)+IterNo()-1) as Date&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;While IterNo() &amp;lt;= 730;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Fact:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; date(makedate(2014) + ceil(rand()*730)) as Date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; rand()*100 as Sales,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; pick(ceil(rand()*5),'5311','5312','5314','5315','5317', '1') as [Object Account]&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 1000;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;then in a straight table chart you can use Date as Dimension&lt;/P&gt;&lt;P&gt;and this expression for november 2014 sales&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SUM({$ &amp;lt;MonthsAgo={13},[Object Account]={5311,5312,5314,5315,5317}&amp;gt;} Sales)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;or this for november 2015 sales&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;EM style="font-size: 13.3333px;"&gt;SUM({$ &amp;lt;MonthsAgo={1},[Object Account]={5311,5312,5314,5315,5317}&amp;gt;} Sales)&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 19:52:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974149#M467008</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-12-22T19:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Previous Month and Last Year Previous Month in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974150#M467009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added in the MonthsAgo field but the expression isn't working for me...all it returns are 0s&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 16:10:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974150#M467009</guid>
      <dc:creator>neena123</dc:creator>
      <dc:date>2015-12-23T16:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Previous Month and Last Year Previous Month in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974151#M467010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you add the Calendar table (associated with your table) with the MonthsAgo field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 18:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974151#M467010</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-12-23T18:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to show Previous Month and Last Year Previous Month in a straight table?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974152#M467011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG alt="Data Model.PNG" class="jive-image image-1" src="/legacyfs/online/109955_Data Model.PNG" style="height: 427px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Attached is my data model. I should mention that my Month field from my Final table is actually not a Month field. It was the individual sales amount fields for each month. I grouped the 12 individual sales fields and added them under the Month field. Would that be the reason why the above expression is not working? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2015 15:18:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-Previous-Month-and-Last-Year-Previous-Month-in-a/m-p/974152#M467011</guid>
      <dc:creator>neena123</dc:creator>
      <dc:date>2015-12-24T15:18:02Z</dc:date>
    </item>
  </channel>
</rss>

